Title: [Plugin: WordPress.com Popular Posts] Code to add a tag for thumbnails
Last modified: August 20, 2016

---

# [Plugin: WordPress.com Popular Posts] Code to add a tag for thumbnails

 *  Resolved [jhodgson](https://wordpress.org/support/users/jhodgson/)
 * (@jhodgson)
 * [14 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-popular-posts-code-to-add-a-tag-for-thumbnails/)
 * Hi guys, just added a bit of code to make a shortcut for displaying the post’s
   thumbnail along with the link.
 * I added this on line 335:
 *     ```
       // %post_thumbnail% by James C. Hodgson, Jr
                if ( FALSE !== strpos( $instance['format'], '%post_thumbnail' ) ) {
                   // ...and take yo picture; i wanna get witcha. I won't cuss or hitcha!
                   $thumb = get_the_post_thumbnail( $post['post_id'], 'thumbnail');
                   $replace['%post_thumbnail%'] = $thumb;
                }
       ```
   
 * Not sure if it’s helpful to anyone, but if it is, that’s all there is to it.
 * Any chance of this making it into the plugin?
 * Thanks!
 * [http://wordpress.org/extend/plugins/wordpresscom-popular-posts/](http://wordpress.org/extend/plugins/wordpresscom-popular-posts/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [frasten](https://wordpress.org/support/users/frasten/)
 * (@frasten)
 * [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-popular-posts-code-to-add-a-tag-for-thumbnails/#post-2589445)
 * Thank you for your idea. I’ve added this feature in 2.6.0, in a similar way.

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: WordPress.com Popular Posts] Code to add a tag for thumbnails’
is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpresscom-popular-posts_b3b7b7.
   svg)
 * [WordPress.com Popular Posts](https://wordpress.org/plugins/wordpresscom-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpresscom-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpresscom-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpresscom-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpresscom-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpresscom-popular-posts/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [frasten](https://wordpress.org/support/users/frasten/)
 * Last activity: [14 years, 2 months ago](https://wordpress.org/support/topic/plugin-wordpresscom-popular-posts-code-to-add-a-tag-for-thumbnails/#post-2589445)
 * Status: resolved