Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Template for Yet Another Related Posts Plugin (YARPP) that returns related posts with the relatedness score
<?php /*
YARPP Template: Also Interested...
Description: This template returns the related posts with the relatedness score.
Author: mitcho (Michael Yoshitaka Erlewine) tweaked by the wpPERFORM.com team
*/
?>
<h3 class="related-posts">You May Also Be Interested In ...</h3>
<?php if (have_posts()):?>
<ol>
<?php while (have_posts()) : the_post(); ?>
<li>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> (<?php the_score(); ?>)
</li>
<?php endwhile; ?>
</ol>
<?php else: ?>
<p>No related posts.</p>
<?php endif; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment