Sort by: Recently Added Likes

Send Footer to Bottom of Viewport on Short Posts

@replace {{footer-height}}

/* If a page's height is shorter than the viewport, this ensures the footer does not creep beyond the bottom of the viewport */
body {
   position: relative;
   min-height: 100vh;
   padding-bottom: {{footer-height}};
}
.site-footer {
   position: absolute;
   width: 100%;
   bottom: 0;
}

#

Customizing Your 404 Page Not Found

@replace {{title}}, {{text}}

// Set a custom title for the 404 page
add_filter( 'generate_404_title', function ( $title ) {
   return '{{title}}';
} );

// Set custom text for the 404 page
add_filter( 'generate_404_text', function ( $text ) {
   return '{{text}}';
} );

// Hide the search form from content area on the 404 page
add_filter( 'get_search_form', function ( $form ) {

   if ( is_404() && did_action( 'generate_after_entry_header' ) && ! did_action( 'generate_after_content' ) )
      return '';

   return $form;

} );

#

Set Default Customizer Color Palette

@replace @arr

// Set 8 colors that will be used to fill the color picker palette in the Customizer
add_filter( 'generate_default_color_palettes', function ( $palettes ) {
   return array(
      '#040404',
      '#5b5549',
      '#9b5c4d',
      '#d3ac58',
      '#296a7f',
      '#272727',
      '#adada8',
      '#f5f5f5',
   );
} );

Source

Fix Center Alignment of Main Nav Menu Items With Children

@replace {{gp-layout-setting-menu-item-width}}

/* Fixes center alignment of main nav menu items that show children in a dropdown */
.main-navigation.mobile-header-navigation ul li.menu-item-has-children a {
   padding-right: {{gp-layout-setting-menu-item-width}};
}
.main-navigation.mobile-header-navigation ul li.menu-item-has-children span.dropdown-menu-toggle {
   position: absolute;
   right: 0;
}

#

Change Header Logo HREF

@replace {{link}}

// Change the URL to which the header logo links
add_filter( 'generate_logo_href', function( $url ) {
    return '{{link}}';
});

#

Add Google Font(s) to Typography Customizer

@replace font-slug, font[name]:@str, font[variants]:@arr, font[category]:@str

// Add Google Fonts to the typography font options in the customizer
add_filter( 'generate_typography_customize_list', function ( $fonts ) {

   $fonts['monoton'] = array( 
      'name' => 'Monoton',
      'variants' => array( '400' ),
      'category' => 'cursive'
   );

   $fonts['fanwood_text'] = array(
      'name' => 'Fanwood Text',
      'variants' => array( '400', '400i' ),
      'category' => 'serif'
   );
	
   return $fonts;

} );

Source

Move Navigation Below Page Header

// Renders the navigation below the page header instead of before
add_action( 'after_setup_theme', function () {

   remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
   add_action( 'generate_after_header', 'generate_add_navigation_after_header', 15 );

} );

Source