Genesis child: Display only on the front page

Community Forums Forums Design Tips and Tricks Genesis child: Display only on the front page

This topic is: not resolved

Tagged: 

This topic contains 1 reply, has 1 voice, and was last updated by  FloridaLegend 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #52634

    FloridaLegend
    Participant
    Post count: 5
    add_action( 'genesis_site_title', 'site_title' );
    function site_title() {
    if ( is_home() ) {
        echo '<a href="/"><img src="'. get_stylesheet_directory_uri() .'/images/header.jpg"></a>';
       } else {
    	echo '<a href="/"><img src="'. get_stylesheet_directory_uri() .'/images/header-magic.jpg"></a>';
       }
    }
    

    I would like to display a different header for the rest of my site, but I think I’m going about it in the wrong way. Right now it loads the secondary image on every page.

    #52637

    FloridaLegend
    Participant
    Post count: 5

    Lol, nevermind. solved:

    Replace ‘is_home()’ with ‘is_front_page()’

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.