Show random post


#1

My request is very simple. I am looking for a way to display a random post when the user visits a particular URL (e.g. /random). Is this possible?


#2

You would have to create some script that crawls your sitemap and picks a random post.

YourUrl.com/sitemap-posts.xml

Then you would need to load that script in your /random URL and let it redirect you to the randomly chosen one.

This may not be the most optimal way of doing things in terms of speed, but it would probably be one of the easier solutions.