Related Posts
…in the template: // First display a set of posts with the default settings. relevanssi_the_related_posts( $post->ID ); global $doing_second_related_posts; $doing_second_related_posts = true; // Get the post objects with the new settings. relevanssi_the_related_posts( $post->ID ); // This can be in theme functions.php: // Add a filter to adjust the settings on……to use random posts or leave the related posts empty. Adding the related posts manually If you don’t want to append the related posts to the posts automatically, you can use the relevanssi_the_related_posts() function in your templates. The function will print out the related posts. If used without a parameter,……around the caching, you need to use different methods for each set: you can display one with the standard relevanssi_the_related_posts() function and the other with relevanssi_get_related_post_objects() which will create a separate cache. Here’s one example of how to display two sets of related posts in a post template: // First…