WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Featured image duplicating in header..Why is This? (4 posts)

  1. Ncastro340
    Member
    Posted 3 years ago #

    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

  2. Ncastro340
    Member
    Posted 3 years ago #

    Sorry..Site is Here

  3. alchymyth
    The Sweeper & Moderator
    Posted 3 years ago #

    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="" />
  4. Ncastro340
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic