Georgia Lou Studios

Welcome to the Help Center!

Bonus: Add hero header to ALL pages

Follow

This article will walk you through how to add the Blog Hero Header to ALL pages on your site.

Make sure you:

1. Setup the Blog Page Hero Header

2. Turn off the Home Page Hero Header

ALSO NOTE: The hero header does not show on all pages and single post pages for a reason. This reason is SEO. Google does penalize site rankings for sites with this kind of header. Having this style on 1-2 pages like the home and blog list page is not a big deal as these are not your main SEO driven pages. But single post pages should be where you focus your SEO efforts and adding the hero header to your single pages may affect the SEO for individual posts, especially on mobile. You have been warned... ;)

 

How to:

  1. Install and activate the plugin, WP Editor
  2. On the Dashboard, go to Appearance > Theme Editor1.png
  3. Under Theme Files on the right side of the screen, find the functions.php file and click on it. This will open the file in the code window.
  4. Scroll to the bottom of the code.2.png
  5. Copy and paste the following code at the bottom of the file after any other code. Click the Update File button to save changes.
add_action( 'genesis_after_header', 'belcanto_blog_hero'  ); 
function belcanto_blog_hero() {
if ( !is_front_page() ) {
    $hero1 = get_theme_mod( 'belcanto_front_featured_layout_setting', 'none' );
    if ( $hero1 === 'hero1' ) {
        get_template_part('lib/featured/featured-hero-1-front');
    }

    $hero2 = get_theme_mod( 'belcanto_front_featured_layout_setting', 'none' );
    if ( $hero2 === 'hero2' ) {
        get_template_part('lib/featured/featured-hero-2-front');
    }

    $hero3 = get_theme_mod( 'belcanto_front_featured_layout_setting', 'none' );
    if ( $hero3 === 'hero3' ) {
        get_template_part('lib/featured/featured-hero-3-front');
    }
}
}

 3.png

Was this article helpful?
0 out of 0 found this helpful

Comments

Powered by Zendesk