• Resolved stef24h

    (@stef24h)


    Hi there,

    Thanks for your plugin !
    The thing is that the image displays twice on page and post, one displays the featured image and the second the correct featured image with zoom. Can you help ?

    THANKS !

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author cubecolour

    (@numeeja)

    please provide a link to a page on your site where the issue can be seen

    Thread Starter stef24h

    (@stef24h)

    I can’t, I’m working on my machine sorry. Screenshots maybe if it helps ?

    Plugin Author cubecolour

    (@numeeja)

    I need to see the site itself to get clues from viewing the page source.

    Does your theme include the featured image on the page by default?

    Thread Starter stef24h

    (@stef24h)

    This is the Twenty Seventeen theme. The website is “pandore.love” but this is not the version I’m working on.

    Plugin Author cubecolour

    (@numeeja)

    Twenty seventeen adds a featured image to the page by default, so you are seeing that in addition to the zoomable one added by the plugin.

    This is added by the following lines in the theme’s header.php:

    
    	/*
    	 * If a regular post or page, and not the front page, show the featured image.
    	 * Using get_queried_object_id() here since the $post global may not be set before a call to the_post().
    	 */
    	if ( ( is_single() || ( is_page() && ! twentyseventeen_is_frontpage() ) ) && has_post_thumbnail( get_queried_object_id() ) ) :
    		echo '<div class="single-featured-image-header">';
    		echo get_the_post_thumbnail( get_queried_object_id(), 'twentyseventeen-featured-image' );
    		echo '</div><!-- .single-featured-image-header -->';
    	endif;
    	?>
    

    To override this I would suggest using a child theme with a custom version of this file omitting these lines

    Thread Starter stef24h

    (@stef24h)

    thanks, perfect !

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Featured image displays twice’ is closed to new replies.