WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. naveenishere
    Member
    Posted 1 year 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);

    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/

  2. Johan van der Wijk
    Member
    Plugin Author

    Posted 1 year 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

About this Topic