• Resolved Ncastro340

    (@ncastro340)


    Can anyone tell me why my featured images are duplicating into the header of my pages..??

    I really appreciate any help!
    Thanks in advance,
    Nick

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

    (@ncastro340)

    Sorry..Site is Here

    this is programed into header.php of your theme.

    for instance, in Twenty Ten, this code does that:

    <?php
    					// 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 ), 'post-thumbnail' ) ) &&
    							$image[1] >= HEADER_IMAGE_WIDTH ) :
    						// Houston, we have a new header image!
    						echo get_the_post_thumbnail( $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; ?>

    if you don’t want the feature, change the whole part to:

    <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />

    Thread Starter Ncastro340

    (@ncastro340)

    Problem Soleved.
    Worked just as it should have thanks for your help! I really appreciate it.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Featured image duplicating in header..Why is This?’ is closed to new replies.