I have suppressed the header image on my photo gallery page, http://thetwobyres.co.uk/photos by using an is_page() condition in my header.php.
I am using Twenty Eleven and have created a child theme, with the header.php.
<?php
// Check to see if the header image has been removed - added the is_page condition
$header_image = get_header_image();
if ( ! empty( $header_image ) && (! is_page('photos') ) ) :
?>
This works in Safari and IE, but not in FireFox where the header image still shows up.
Any suggestions appreciated.
<?php
// Check to see if the header image has been removed - added the is_page condition
if( !is_page('photos' ) :
$header_image = get_header_image();
if ( !empty( $header_image ) ) :
?>
[...]
<?php endif; // end check for removed header image ?>
<?php endif; // end check for photos page ?>
Thanks - I tried, couldn't figure out where to add the endifs, kept getting syntax error.
My code is here, http://pastebin.com/3h2b1kcV - where should I add the two endifs?
No coding expert.
I get a syntax error after pasting your code
http://pastebin.com/7m2xTzMF
Typo! Change:
if( !is_page('photos' ) : // check for photos page
to:
if( !is_page('photos' ) ) : // check for photos page
Sorry: no syntax error, but the header image on http://www.thetwobyres.co.uk/photos is still enabled in FireFox.
Must have been the cache - now it seems to work in all browsers.
Thanks for helping me out!