Yet Another Related Posts Plugin (YARPP)
[resolved] Don't show related posts on sticky? (3 posts)

  1. CarolWP
    Posted 2 years ago #

    Is there a way to keep related links from displaying on a sticky post? I've got a general "Welcome to my site" type of post as a sticky, and the concept of relatedness doesn't really apply to it.


  2. CarolWP
    Posted 2 years ago #

    Just answered my own question! I switched to using a new template to show the related posts. I edited the example template to read as follows, and called it yarpp-template-new.php:

    YARPP Template: New
    Author: Me, based on mitcho (Michael Yoshitaka Erlewine)
    Description: My YARPP template.
    <?php if ( ( !is_sticky() ) && (have_posts())):?>
    <h3>Related Posts</h3>
    	<?php while (have_posts()) : the_post(); ?>
    	<li><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a><!-- (<?php the_score(); ?>)--></li>
    	<?php endwhile; ?>
    <?php endif; ?>
  3. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 2 years ago #

    Great! That's a nice systematic solution.

    You can also add the comment <!--noyarpp--> to any post to display the automatic display of YARPP on that page.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yet Another Related Posts Plugin (YARPP)
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic