Support » Plugin: Yet Another Related Posts Plugin (YARPP) » [Plugin: Yet Another Related Posts Plugin] i want a related items "search results" page
6 years, 6 months 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.
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,
"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!
6 years, 3 months ago
Ah, very cool! Please submit any patches which you think would be of general interest here, as a new ticket: