Title: post thumbnail code has issue
Last modified: August 20, 2016

---

# post thumbnail code has issue

 *  Resolved [naveenishere](https://wordpress.org/support/users/naveenishere/)
 * (@naveenishere)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/post-thumbnail-code-has-issue/)
 * Thanks for the sharing this plugin.
    There is one problem is this plugin.When
   user have mulitple post thumbnails.I kept this plugin on a page with wp-ecommerce
   plugin and thumbnail got messey .It was picking some random picture other than
   post thumbnail,I guess becausee wp-commerce and wp-ecommerc both using the_content
   filter.
 * Anyway I sorted out this issue by changing one line in post-widget.php
    I thought
   i let you know.
 * I changed this line
    _ echo get\_the\_post\_thumbnail($content\_post->ID); To
   $post\_thumbnail\_id = get\_post\_thumbnail\_id( $content\_post->ID); echo $\
   _image=wp\_get\_attachment\_image( $post\_thumbnail\_id,’post-thumbnails’,$attr);
 * ( around line no 107) in
    ** widget($args, $instance)** in post-widget.php
 * [http://wordpress.org/extend/plugins/custom-post-widget/](http://wordpress.org/extend/plugins/custom-post-widget/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Johan van der Wijk](https://wordpress.org/support/users/vanderwijk/)
 * (@vanderwijk)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/post-thumbnail-code-has-issue/#post-3585874)
 * Thank you for letting me know about this, I will investigate and if necessary
   add the suggested fix in the next plugin release.

Viewing 1 replies (of 1 total)

The topic ‘post thumbnail code has issue’ is closed to new replies.

 * ![](https://ps.w.org/custom-post-widget/assets/icon.svg?rev=2884166)
 * [Content Blocks (Custom Post Widget)](https://wordpress.org/plugins/custom-post-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/custom-post-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/custom-post-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/custom-post-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/custom-post-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/custom-post-widget/reviews/)

## Tags

 * [wp ecommerce](https://wordpress.org/support/topic-tag/wp-ecommerce/)

 * 1 reply
 * 2 participants
 * Last reply from: [Johan van der Wijk](https://wordpress.org/support/users/vanderwijk/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/post-thumbnail-code-has-issue/#post-3585874)
 * Status: resolved