Do you want to redirect users to a random article? Random article allows users to explore older articles and read articles that are hidden in the archives of your blog. In this article, we will show you how to easily redirect users to a random post in WordPress.

Why should you redirect users to a random article?

By default, WordPress posts appear in reverse chronological order (newest to oldest), so your users will read the last published article first. If you write regularly on your blog, your users may not be able to discover your old articles.

One way to overcome this problem is to display random articles in the sidebar of your blog. This will allow your users to discover new content while increasing your page views.

You can also redirect users to a random post from a 404 error pages error or add a "Surprise Me" button in your blog's custom archive page, which redirects users to a random post.

That being said, let's look at how to redirect users to a random article on WordPress.

Redirect users to a random article on WordPress

The first thing you need to do is install and activate the plugin Redirect URL to Post. For more details, see our step-by-step guide to way to install a WordPress plugin .

After activation, you will see the URL query parameters for the redirect on the page of WordPress plugins. This plugin has no other settings page.

You can use any of these query parameters in your posts and pages to redirect users to random posts, latest posts, and other older posts.

redirect to another page wordpress.jpg

To redirect users to a random post, you need to copy the article-random query parameter from here and add it in your error pages and other pages as a link.

Clicking on the link will redirect users to a different random article.

You can also add a button for redirect to your blog. Just add this shortcode in your WordPress posts and pages to show the random post button.

[redirect_to_post_button]

When users click on this button, they will be redirected to a random article on your Website.

access a random article wordpress.jpg

We hope this article has helped you learn how to redirect users to a random post in WordPress. If you have any questions related to this tutorial, please let us know.