The Fundraising featured picture is replacing my header. How to solve?

The featured picture I use for my fundraiser is displayed in the header as well. How do I get rid of this?

http://carpetsforcommunities.org/fundraisers/child-friendly-school-fundraiser/

  • PC
    • WPMU DEV Initiate

    Hiya Rowan,

    Thanks for standing by,

    I checked and see that both the images have different source i.e. they are different images. Have you made any changes to the theme templates ?

    Can you please try and switch to the default theme and see if you see the same issue ?

    Cheers, PC

  • mansoormb
    • Design Lord, Child of Thor

    The only thing I can think of is that there is a featured image set in the header.php file so when you set a featured image on a page it will replace both images so just look for a code like this in your header.php under the #branding

    if ( has_post_thumbnail() ) {

    the_post_thumbnail();

    }

    Replace it with:

    <img src="http://carpetsforcommunities.org/wordpress/wp-content/uploads/2012/02/WEBSITE-BANNER-31.gif" width="940" height="198" alt="">

    Does your theme have custom-header ?

    Thanks

    Mansoor

  • Rowan
    • Flash Drive

    Hey Mansoor,

    Thank you, I am not familiar with .php, but I’m sure I found the code you are talking about in the header.php.

    <?php */
    // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    if ( is_singular() && 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!
    echo get_the_post_thumbnail( $post->ID );
    elseif ( get_header_image() ) : ?>
    <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    <?php endif; ?>
    </div><!-- #branding -->

    However, I have no idea WHICH part to edit… do you know?

    Thanks again!

  • PC
    • WPMU DEV Initiate

    Hiya,

    Just change the code as per below and it should work fine.

    Please note that you should do it via FTP so that you can revert the changes in case something goes wrong.

    <?php */
    // Check if this is a post or page, if it has a thumbnail, and if it's a big one
    if ( is_singular() && 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!
    // echo get_the_post_thumbnail( $post->ID );
    // elseif ( get_header_image() ) : ?>
    <img src="<?php header_image(); ?>" width="<?php echo HEADER_IMAGE_WIDTH; ?>" height="<?php echo HEADER_IMAGE_HEIGHT; ?>" alt="" />
    <?php endif; ?>
    </div><!-- #branding -->

    Cheers, PC

  • aristath
    • Recruit

    The original poster of this issue is no longer an active member on these forums.

    I am marking this issue as resolved.

    If however at some time the member becomes active again and the issue still exists, don’t hesitate to reopen it and post an update on your current status.

    Cheers!

    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.