Trying to get the header image to change on every page is such a pain with Wordpress! I know the deal with featured images but this is a customized theme. http://sandersscott.wp.hobbsherder.com The header images need to change on every page and all the images are in each page as Featured images. I place this in the header.php file and it breaks the site... <!--- BEGIN featured image header ---> <?php if (has_post_thumbnail()){ echo'<div class="art-header-noimage">'; the_post_thumbnail('full'); } else{ echo '<div class="art-header">'; } ?> <!--- END featured image header ---> Code (markup):
The end statement are supposed to be before ?> Can you post the output error you are getting? /Partyboy
partyboy..thanx for responding...below is what i have in the header.php file. i need to place this code in the header file below... <!--- BEGIN featured image header ---> <?php if (has_post_thumbnail()){ echo'<div class="art-header-noimage">'; the_post_thumbnail('full'); echo '</div>; } else{ echo '<div class="art-header"></div>'; } ?> <!--- END featured image header ---> PHP: HEADER.PHP <body <?php if(function_exists('body_class')) body_class(); ?>> <div id="hh-page-background-glare-wrapper"> <div id="hh-page-background-glare"></div> </div> <div id="hh-main"> <div class="cleared reset-box"></div> <div id="hh-header-bg" class="hh-header"> </div> <div class="cleared reset-box"></div> <div class="hh-box hh-sheet"> <div class="hh-box-body hh-sheet-body"> <div class="hh-header"> <div class="hh-bar hh-nav"> <div class="hh-nav-outer"> <div class="hh-nav-wrapper"> <div class="hh-nav-inner"> <?php echo theme_get_menu(array( 'source' => theme_get_option('theme_menu_source'), 'depth' => theme_get_option('theme_menu_depth'), 'menu' => 'primary-menu', 'class' => 'hh-hmenu' ) ); ?> </div> </div> </div> </div> <div class="cleared reset-box"></div> <div class="hh-logo"> <div style="margin:10px 0 0 0;">Harry & Scott Sanders for Baltimore and Harford Counties Real Estate | Contact Us: 410-879-8080 <a href="#" target="_blank"><img src="/wp-content/themes/sanders_scott/images/social-facebook.jpg" alt="Facebook" width="24" height="24"/></a> <a href="#" target="_blank"><img src="/wp-content/themes/sanders_scott/images/social-twitter.jpg" alt="twitter" width="24" height="24"/></a> <a href="#" target="_blank"><img src="/wp-content/themes/sanders_scott/images/social-linkedin.jpg" alt="linkedin" width="24" height="24"/></a> <a href="#" target="_blank"><img src="/wp-content/themes/sanders_scott/images/social-youtube.jpg" alt="youtube" width="24" height="24"/></a></div> </div> </div> <div class="cleared reset-box"></div> PHP:
This is wrong! Correct is <?php if(function_exists('body_class')) body_class(); ?> <body> Why is this statement alone when you can put it below the body tag?