WordPress.org

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] [Plugin: Yet Another Related Posts Plugin] i want a related items "search results" page (3 posts)

  1. rkstar
    Member
    Posted 4 years ago #

    i'm working on a site using this plugin and it's great! but i want to limit the number of related posts in the sidebar and then have a "more..." link that goes to a search results page with _all_ of the related posts.

    possible?

  2. rkstar
    Member
    Posted 4 years ago #

    i figured out how to do this:

    first, i have a search.php page that determines which template to use based on query string vars.

    next, i called the related_posts() func with my own set of opts:

    $opts = array(
    	"paged"	=> 1,
    	"posts_per_page"=> 4,
    	"template_file"	=> "yarpp-template-search-teachings.php"
    );
    related_posts($opts, true, $post_id);

    i also made a couple of mods to the yarpp_related() func inside magic.php to deal with my "paged" and "posts_per_page" vars i'm sending.

    i get back all the data i need!

  3. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 4 years ago #

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