[Plugin: Yet Another Related Posts Plugin] Adding YARPP to Thesis Theme (2 posts)

  1. relaxedguy
    Posted 7 years ago #

    I would like to turn off automatic display of YARPP and move the display code into my Thesis theme custom_functions.

    I tried to paste in a generic example from the included templates.

    <h3>Related Posts</h3>
    <?php if ($related_query->have_posts()):?>
    	<?php while ($related_query->have_posts()) : $related_query->the_post(); ?>
    	<li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></li>
    	<?php endwhile; ?>
    <?php else: ?>
    <p>No related posts.</p>
    <?php endif; ?>

    This throws a bunch of errors.

    related_posts() works fine but I would like to remove the weighting score and perform additional formatting.

    Is there something simpler that I can use like:

    related_posts(no weighting numbers, different <li>)

    I can't seem to find the definitive guide that explains how to create the code to do this.

    Great plug-in otherwise, works like a charm.

  2. @relaxedguy - if you'd like to customize the formatting, please use YARPP templates, as described here:


    Even with YARPP templates, you will want to just put related_posts() in your theme.

    By the way, the match score you see is only being displayed for you because you're logged into the site. :) If you log out of wp-admin it should disappear.

Topic Closed

This topic has been closed to new replies.

About this Topic