WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using the Wordpress related plugin which is great but I would like to display the feature picture of the page.

It mentions on http://wordpress.org/extend/plugins/related/installation/ about using a custom code.

Below is what I have so fave but I'm looking to add the feature image thumbnail to the related post.

    $rel = $related->show(get_the_ID(), true);
    foreach ($rel as $r) :
        echo '<li><a href=' . get_permalink($r->ID). '>' . $r->post_title . '</a>' . '</li>';
share|improve this question
up vote 0 down vote accepted

Have worked it out and have the following code:

<?php $rel = $related->show(get_the_ID(), true);
foreach ($rel as $r) :
echo '<a href='.get_permalink($r->ID).'>'.get_the_post_thumbnail($r->ID, array(50,50)).'<div class=page-related-title>'.$r->post_title.'</div>'.'</a>'.'<br />';
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.