Skeleton-exclude header image from page
-
I’m using the Skeleton responsive theme and I’d like to omit the header image from one page, Contact Us. I’ve tried editing the header.php file to add a condition to the original set that would detect the page and prevent the image from being applied. In the code fragment below, the second condition in the “if” statement, “&& !(is_page(‘contact-us’)) is what I added. The slug name of the Contact Us page is definitely ‘contact-us’. I don’t see why the code below wouldn’t allow things to get past the first line when the Contact Us page loads.
// Check if this is a post or page, if it has a thumbnail, and if it exceeds defined HEADER_IMAGE_WIDTH if ( is_singular() && !(is_page('contact-us')) && current_theme_supports( 'post-thumbnails' ) && has_post_thumbnail( $post->ID ) && ( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'post-thumbnail' )) && $image[1] >= HEADER_IMAGE_WIDTH ) : // Houston, we have a new header image!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Skeleton-exclude header image from page’ is closed to new replies.