Support » Plugin: Yet Another Related Posts Plugin (YARPP) » [Plugin: Yet Another Related Posts Plugin] related_posts outside of the loop
4 years, 5 months ago
How can use related_posts outside of the loop using the post ID?
Just call related_posts(array(), $post_ID) or equivalently yarpp_related(array(), $post_ID). 🙂
The array() corresponds to various options you can call on-the-fly. More info on the options are in the readme.
Maybe the problem is I’m using too many args. How would I incorperate it into this?
yarpp_related(array('exclude' => array('category' => 10459), 'recent' => '1 month')