How to Display Random Posts in WordPress



aaa

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.

–Links–

►partner affiliate link https://aioseo.com/
►written tutorial https://www.wpbeginner.com/wp-tutorials/how-to-display-random-posts-in-wordpress/

–Top Resources–

Use Promo Code WPBVIP
►Best WordPress Contact Form Plugin https://wpforms.com/wpbeginner
►Best WordPress Analytics Plugin https://www.monsterinsights.com/
►Best Lead Generation Plugin https://optinmonster.com/
►Best WordPress SEO Plugin https://aioseo.com/
►Best Landing Page Builder for WordPress https://www.seedprod.com/
►Best WordPress Giveaway Plugin https://rafflepress.com/

–Related Videos–

►WordPress Tutorial – How to Make a WordPress Website for Beginners https://www.youtube.com/watch?v=DvbFBxKcORA
►WordPress Gutenberg Tutorial: How to Easily Work With the Block Editor https://www.youtube.com/watch?v=JjfrzGeB5_g
►What is SEO and How Does it Work? https://www.youtube.com/watch?v=JjfrzGeB5_g
►How to Install a WordPress Theme https://www.youtube.com/watch?v=ZIPQRQLAz90
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:

https://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
https://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.
https://www.youtube.com/subscription_center?add_user=wpbeginner

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

Follow us on Twitter

Check out our website for more WordPress Tutorials
http://www.wpbeginner.com
#WordPress #WordPressTutorial #WPBeginner

bbb

source

You May Also Like

About the Author: admin

Leave a Reply

Your email address will not be published. Required fields are marked *