Unlike to related blog posts you can also display a list pf randomly selected blog posts via AJAX at the end of all or a few selected blog posts. The plugin becomes more useful if when you write any article which is not related to your blog category and related posts plugin fails in displaying other related posts. In such case you can disable related posts on that article and add a shortcode to display randomly selected blog posts.
So first install and activate the plugin called AJAX Random Posts. After activation if you want to display random posts manually on selected articles then simply copy paste <!–ajaxrp–> at the end of your posts.
OR if you want to display random posts after each and every posts you have published then copy paste the following template in your theme’s single.php file: <?php if (function_exists(‘ajaxrp’)) ajaxrp(); ?>
Other than this the plugin provides you a few more options on Dashboard -> Settings -> AJAX Random Posts page:
- Number of posts in the list.
- Custom AJAX loading message
- Include sticky (featured) post in the list
- Automatically display the random posts in a single post page
- Custom HTML code before and after the list and custom post format