• Hey

    I have a problem. I have set a slider instead of the header image on my website home page based on wordpress. Other pages should have featured images as headers (I assigned featured image to each page) I worked perfectly before. But for some reason they are not showing anymore, they show when I edit page in the small window on the right but on the page view they don’t. (I have Twenty Eleven as a child theme)

    I found a code I used, which worked before.

    <?php if ( is_front_page() ) { if ( function_exists( 'meteor_slideshow' ) ) { meteor_slideshow(); } } else {
    // 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; } ?>

    It might be that the problem accured when I re-installed wordpress. But I also re-uploaded all the images. Also I changed the header image size a bit bigger and images are the same size. My website is https://www.duponds.eu/wordpress

    Help anyone? ??

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Featured image as header not showing’ is closed to new replies.