random

2 minutes read
Older posts on your blog can “extend life” by creating a page template that will redirect readers to a random post. It may also be needed when a visitor wants to read something in the perspective of “useful”, but does not know where to start. Random post to help him 🙂In this article – a simple way to accomplish this. Create a new file and call it page-random.php . Paste the following code into it: 1 <?php 2 // set the parameters for get_posts() 3 $args = array( 4 ...