How to Show a Random Post on the Homepage in WordPress
By default, WordPress displays all the posts on the homepage in reverse chronological order. This works out great for sites with continuously changing content like a news or technology blog. However, this leads to what I feel is a huge “wastage” of content that can still be relevant. Not all content is time sensitive. An outdated news story certainly doesn’t need to be resurfaced. But an interesting political analysis might always be relevant. We’ve talked about republishing older blog posts before, and that’s one way to get leverage out of your existing content. But what if you could randomly serve up blog posts on your homepage everytime a visitor viewed it? There are lots of plugins and pieces of code that show you random blog posts on the sidebar in the form of a widget. But so far, I haven’t seen anything that displays a random blog post on the homepage. I’m not looking to republish older blog posts, or replace the existing reverse chronological set up. I jus...
Comments