Category Posts Widget
-
Hello all! Thanks for being here to help.
I am installing a website – unfortunately it’s not live to share – I am using a plugin called category posts to list some awards the company has won as a widget that shows the post excerpt and featured image. However this plugin will only use a thumbnail if a featured image is set.
What I am looking to do is change the code to display the first image in the post, along with it’s associated link, instead of displaying the featured image which is linked to the post.
The Plugin code for this section looks like
<?php if ( function_exists('the_post_thumbnail') && current_theme_supports("post-thumbnails") && $instance["thumb"] && has_post_thumbnail() ) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"> <?php the_post_thumbnail( 'cat_post_thumb_size'.$this->id ); ?> </a> <?php endif; ?>
How do I change this part of the plugin to display the first image of the post, and include the same link that image has when the post is displayed?
Idea’s? Thank you ??
M
- The topic ‘Category Posts Widget’ is closed to new replies.