• Hi there,

    I have made one of my pages to be the main posts page while another is the front/home page

    Now when I attach a featured image to the main posts page it won’t show there – the main header image is what comes up while the featured image for that page is ignored..on all the rest of the main pages & posts the featured image is replacing the header image (when set), can someone please tell me where & how can this be changed ? controlled?

    Thanks
    Amit

Viewing 3 replies - 1 through 3 (of 3 total)
  • what is the current code for the header image (in header.php ?) ?

    https://codex.www.ads-software.com/Forum_Welcome#Posting_Code

    Thread Starter Amit Kvint

    (@webifish)

    <?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 : ?>
    <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 ?>

    <?php endif; // end check for removed header image ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Featured image on posts page’ is closed to new replies.