WordPress.org

Ready to get started?Download WordPress

Forums

WP Favorite Posts
Thumbnails in widget (5 posts)

  1. CoastAMS
    Member
    Posted 1 year ago #

    This plugin is great, I'm using it with some custom posts and all works well, except...

    I would like to add a thumbnail to each Favorited item in the widget, i've tried the below code and although this displays an image - it displays the same thumbnail for every post.

    the_post_thumbnail( $thumbsize );
                echo "<a href='".get_permalink($o->post_id)."' title='". $p->post_title ."'>" . $p->post_title . "</a>($o->meta_value)</span>";

    any pointers or guidance would be really appreciated.
    Thanks

    http://wordpress.org/extend/plugins/wp-favorite-posts/

  2. CoastAMS
    Member
    Posted 1 year ago #

    I figured it out..
    just posting in case anyone else needs this:

    just add this line to widget code:

    echo get_the_post_thumbnail( $o->post_id, thumbnail);

  3. lildragn
    Member
    Posted 1 year ago #

    Cheers! Thanks for posting your solution, a lot of peeps don't :)

  4. joegti10
    Member
    Posted 1 year ago #

    ...where exactly in the 'widget code' did you place it?

  5. joegti10
    Member
    Posted 1 year ago #

    in the wp-favorite-posts.php around line 216 for anyone else looking.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic