Conditional tags in header file. Help appreicated
-
Hi people.
(website is http://www.myrevive.co.uk)
I am trying to remove the header images in some of the pages in my twenty eleven theme. I have managed to remove one on page 20 by using this<?php if( !is_page( 20 ) ) : ?>' and '<?php endif; ?>' wrapped around this:- '<?php // Check to see if the header image has been removed $header_image = get_header_image(); if ( $header_image ) : // Compatibility with versions of WordPress prior to 3.4. if ( function_exists( 'get_custom_header' ) ) { // We need to figure out what the minimum width should be for our featured image. // This result would be the suggested width if the theme were to implement flexible widths. $header_image_width = get_theme_support( 'custom-header', 'width' ); } else { $header_image_width = HEADER_IMAGE_WIDTH; } ?>[Moderator Note: Please post code or markup snippets between backticks or use the code button.]
BUT i want to add other pages ID’s to this conditional tage. So it gives me the option to remove headers on pages I want.
Ive tried using this ‘<?php if( !is_page( array( 14, 20 ) ) : ?>’
but it does not seem to work. Can someone please let me know what I am doing wrong with this?
Thanks in advance
Kind regards
website is http://www.myrevive.co.uk
The topic ‘Conditional tags in header file. Help appreicated’ is closed to new replies.