Home Page only Header Image – Syntax Check please – 2012
-
Hi folks,
I’m still struggling away but am nearly there with my theme, just need some help with this one last thing…Details:
Theme 2012 with child
Home page is the 2012 Page template… front-page.php
The Home page ID is (2)Problem:
All I need to do is show the header image on the front page only and nowhere else.
I thought conditional tags are the way to go but the various combinations of code snippets I tried broke the site each time.
I have tried…
<?php if ( is_front_page() && $header_image ) : <?php if ( is_front_page() && $get_header_image ) : <?php if ( is_page( 2 ) ( get_header_image() ) : ?>
in place of the line…
<?php if ( get_header_image() ) : ?>
Maybe one of them is correct but perhaps I am missing something important,
Could one of you coding ninjas please supply the correct syntax for me that will work with this theme/template.Here is the header image code from the 2012 header.php default to save you looking it up…
<stuff>
</nav><!– #site-navigation –><?php if ( get_header_image() ) : ?>
<?php endif; ?>
</header><!– #masthead –>
<div id=”main” class=”wrapper”>`
- The topic ‘Home Page only Header Image – Syntax Check please – 2012’ is closed to new replies.