Sort by: Recently Added Likes

Send Footer to Bottom of Viewport on Short Posts

/* 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;
}
.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

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

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