Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jmarc4312

    (@jmarc4312)

    by the way I am using the latest version of wordpress twenty eleven, woocommerce and have a childs theme installed

    this is a feature of Twenty Eleven, to use the featured images of single post or static page in the header, if these images exceed a minimum dimension.

    to change this feature, you will need to edit header.php in your child theme and remove/change some of the code.

    change this section:

    <?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_the_post_thumbnail( $post->ID, 'post-thumbnail' );
    					else :
    						// Compatibility with versions of WordPress prior to 3.4.
    						if ( function_exists( 'get_custom_header' ) ) {
    							$header_image_width  = get_custom_header()->width;
    							$header_image_height = get_custom_header()->height;
    						} else {
    							$header_image_width  = HEADER_IMAGE_WIDTH;
    							$header_image_height = HEADER_IMAGE_HEIGHT;
    						}
    						?>
    					<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 ?>

    to:

    <?php
    						// Compatibility with versions of WordPress prior to 3.4.
    						if ( function_exists( 'get_custom_header' ) ) {
    							$header_image_width  = get_custom_header()->width;
    							$header_image_height = get_custom_header()->height;
    						} else {
    							$header_image_width  = HEADER_IMAGE_WIDTH;
    							$header_image_height = HEADER_IMAGE_HEIGHT;
    						}
    						?>
    					<img src="<?php header_image(); ?>" width="<?php echo $header_image_width; ?>" height="<?php echo $header_image_height; ?>" alt="" />

    (not tested)

    Thread Starter jmarc4312

    (@jmarc4312)

    Thanks so much, works like a charm.

    I appreciate it alchymyth!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Site logo disappearing, being replaced by images on page’ is closed to new replies.