[Plugin: Yet Another Related Posts Plugin] YARPP Templates (2 posts)

  1. cornetjr
    Posted 6 years ago #

    I am trying to use the code below to draw to link to a post's custom field which I have defined as an image thumbnail. For some reason the thumbnail does not display. Do I not have the bold code in the appropriate place in the loop?

    <?php /*
    Example template
    Author: mitcho (Michael Yoshitaka Erlewine)
    ?><h3>Related Posts</h3>
    <?php if ($related_query->have_posts()):?>

      <?php while ($related_query->have_posts()) : $related_query->the_post(); ?>

    1. " rel="bookmark"><?php the_title(); ?><!-- (<?php the_score(); ?>)-->
    2. <?php if( get_post_meta($post->ID, "Thumbnail", true) ): ?>
      <img style="float:left;margin:0px 5px 10px 0px;" src="<?php echo get_post_meta($post->ID, "Thumbnail", true); ?>" alt="alt text" width="70" height="200"/>

      <?php endwhile; ?>

    <?php else: ?>
    <p>No related posts.</p>
    <?php endif; ?>

  2. to_ul
    Posted 6 years ago #

    yep...this is what i want to know, too.

Topic Closed

This topic has been closed to new replies.

About this Topic