Published on August 6, 2018 by WPBeginner

Want to add a list of random posts in WordPress? Having a list of random posts helps some of your older content gain exposure with your site’s visitors. In this video, we will show you two different methods to display random posts in WordPress.

WordPress has a default recent posts widget that lists your most recent posts in reverse chronological order which is good for your newer posts but your older posts don’t get as much exposure using that widget. For the first method to have random posts displayed you will want to install the Advanced Random Posts Widget plugin:

Advanced Random Posts Widget

With the plugin activated you should be able to go to Appearance, Widgets to add a new widget labeled ‘Random Posts’ that you can add where you like. The widget allows you to choose how many to display and what types of posts to show. There are other settings available to the plugin that you can modify that we have not covered in this video.

For the second method, we will show you how to manually add code to your theme’s functions.php file and you can find the code in our written article here:

www.wpbeginner.com/wp-tutorials/how-to-display-random-posts-in-wordpress/

You will want to copy the entire code from our article and paste it at the bottom of your theme’s functions.php. You can edit this file under Appearance, Editor, and on the right hand side, you would want to select theme functions. Save your changes and now you can add a shortcode where you like on your site to list random posts.

We list the shortcode in our written article as well that you can copy and paste in a post, page, or even in a text widget.

Text version of this tutorial
www.wpbeginner.com/wp-tutorials/how-to-display-random-posts-in-wordpress/

If you liked this video, then please Like and consider subscribing to our channel here for more WordPress videos.
www.youtube.com/subscription_center?add_user=wpbeginner

Check us out on Facebook
www.facebook.com/wpbeginner

Follow us on Twitter
twitter.com/wpbeginner

Check out our website for more WordPress Tutorials
www.wpbeginner.com

Leave a Reply

2 Comments on "How to Display Random Posts in WordPress"

Notify of
avatar

Ppl0a
Guest
Ppl0a
14 days 11 hours ago

Guys what recorder video u r using?

Dan
Guest
Dan
12 days 21 hours ago

Probably OBS.

wpDiscuz