Yet Another Related Posts Plugin (YARPP)
[Plugin: Yet Another Related Posts Plugin] Placement in sidebar.php gives same result on all posts (3 posts)

  1. mskogly
    Posted 6 years ago #

    Added yarpp to my sidebar using this code if ( is_single() && function_exists('related_posts') ) {

    but for some reason I keep getting the same posts. If I use the automatic option instead and let the plugin automatically insert the related posts, it seems to work perfecly.

    Any ideas?

  2. mskogly
    Posted 6 years ago #

    Update: When I use it in the sidebar, I get a list of related posts for the very last post I list in my other loop. I list the six latest posts with thumbs in the sidebar before I call related_posts(), using new WP_Query.

    <?php $recent = new WP_Query("cat=44&showposts=6"); while($recent->have_posts()) : $recent->the_post();?>

    Can it be related to this?

  3. mitcho (Michael Yoshitaka Erlewine)
    Plugin Author

    Posted 5 years ago #

    Most likely your sidebar is out of The Loop, so it doesn't get information on what post is being displayed. Why not use the builtin YARPP widget?

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