Created
December 31, 2012 04:36
-
-
Save wpperform/4417381 to your computer and use it in GitHub Desktop.
Template for Yet Another Related Posts Plugin (YARPP) that returns related posts with the relatedness score
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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