WordPress.org

Forums

Dynamic Featured Image
[resolved] Replacing featured image in category.php (2 posts)

  1. Sinom
    Member
    Posted 1 year ago #

    Hi!

    Great plugin!

    I was trying to change the featured image on the category.php page, but I'm probably doing something wrong..

    The theme is calling for the featured image like this:
    <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('home-post'); ?></a>

    I tried replacing that part with:

    <a href="<?php the_permalink(); ?>">
    					<?php while ( have_posts() ) : the_post();
    					if( function_exists('dfi_get_featured_images') )
    					{
    						$featuredImages = dfi_get_featured_images();//Now, loop through the image to display
    					}
    					endwhile;
    					?>
    					</a>

    But it's not working... it loops the post a thousand time.

    What should I do?

    Best regards

    https://wordpress.org/plugins/dynamic-featured-image/

  2. Ankit Pokhrel
    Member
    Plugin Author

    Posted 1 year ago #

    Hello sinom,

    Thank you for using the plugin. You need to fetch the featured image and display it in your bolg manually. Please go through this support thread http://wordpress.org/support/topic/featured-image-dont-show-in-post?replies=2 .

    Thanks,
    Ankit

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.