Custom Post Widget
[resolved] post thumbnail code has issue (2 posts)

  1. naveenishere
    Posted 3 years ago #

    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);

    $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


  2. Johan van der Wijk
    Plugin Author

    Posted 3 years ago #

    Thank you for letting me know about this, I will investigate and if necessary add the suggested fix in the next plugin release.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Post Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic