WordPress.org

Ready to get started?Download WordPress

Forums

Latest Posts by Author
Showing the thumbnail from custom field (2 posts)

  1. Nikolas
    Member
    Posted 3 years ago #

    Hello how can I show the thumbnail saved on a custom field?
    I used to get it using <?php echo get_post_meta($post->ID, "Thumbnail", true); ?>

    Thank you for this plugin!

  2. Alex Mansfield
    Member
    Plugin Author

    Posted 3 years ago #

    You can add post thumbnails to list by changing line 24 of the latest-posts-by-author.php file from:

    $html .= '<li><a href="'.$numpost->guid.'">'.$numpost->post_title.'</a>';

    to:

    $html .= '<li>' . get_the_post_thumbnail($numpost->ID) . '<a href="'.$numpost->guid.'">'.$numpost->post_title.'</a>';

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic