Support » Plugin: Latest Posts by Author » [Plugin: Latest Posts by Author] Showing the thumbnail from custom field

  • 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!

Viewing 1 replies (of 1 total)
  • Plugin Author Alex Mansfield

    (@alexmansfield)

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

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Latest Posts by Author] Showing the thumbnail from custom field’ is closed to new replies.