Skip to content

Instantly share code, notes, and snippets.

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 team
<h3 class="related-posts">You May Also Be Interested In ...</h3>
<?php if (have_posts()):?>
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a> (<?php the_score(); ?>)
<?php endwhile; ?>
<?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