• Hi, does anyone know how I can disable the featured image in the header in the twenty twelve theme? It doesn’t look like I can remove it from within header settings so is the only option to remove this from within header.php?
    Thanks!

Viewing 2 replies - 16 through 17 (of 17 total)
  • So, @zink02, I just tried to do as you suggested and it didn’t work. I deleted the && 1==2 and now when I try to access my site, I get an HTML Error 500, Internal Server Error! Help!! (I’m admittedly clueless when it comes to html code. Just starting out…) Can anyone help get me up and running again?? I have no idea what I just did.

    http://chewnibblenosh.com/

    RESOLVED!

    THIS IS THE ORIGINAL CODE:

    <?php
    				// Check to see if the header image has been removed
    				$header_image = get_header_image();
    				if ( ! empty( $header_image ) ) :
    			?>
    			<a href="<?php echo esc_url( home_url( '/' ) ); ?>">
    				<?php
    					// The header image
    					// Check if this is a post or page, if it has a thumbnail, and if it's a big one
    					if ( is_singular() &&
    							has_post_thumbnail( $post->ID ) &&
    							( /* $src, $width, $height */ $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ) ) &&
    							$image[1] >= HEADER_IMAGE_WIDTH ) :
    						// Houston, we have a new header image!
    						echo get_header_image( $post->ID, 'post-thumbnail' );
    					else : ?>
    					<img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    				<?php endif; // end check for featured image or standard header ?>
    			</a>
    			<?php endif; // end check for removed header image ?>

    CHANGE FOR THIS CODE:

    <?php
    // Check to see if the header image has been removed
    $header_image = get_header_image();
    if ( ! empty( $header_image ) ) :
    ?>
    <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
    <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    
    </a>
    <?php endif; // end check for removed header image ?>
Viewing 2 replies - 16 through 17 (of 17 total)
  • The topic ‘twenty eleven disable featured image in header’ is closed to new replies.