How to Redirect Users to a Random Post in WordPress

Get real time updates directly on you device, subscribe now.

Do you want to forward users to a random message? A random message allows users to explore older articles and read messages that are hidden in your blog archives. In this article, we show you how you can easily redirect users to any message in WordPress.

Why should you redirect users to a random message?

By default, WordPress messages appear in reverse chronological order (from newest to oldest), so your users first read the last post. If you regularly write on your blog, your users may not be able to find your older articles.

One way to solve this problem is to display random posts in the sidebar of your blog. This allows your users to discover new content while increasing your page views.

You can also redirect users to a random message of  404 error pages or add a “Surprise Me” button on your blog’s custom archive page, which takes users to any post.

Redirect users to any message in WordPress

The first thing you need to do is to install and activate the redirect URL in Post- plugin.

After activation, you will see the URL query parameters for referral on the WordPress plug-in page. This plug-in 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 articles.

To redirect users to a random message, you must copy the random post query parameter here and add it to your error pages and other pages as a link.

If you click on the link, users will be redirected to another random post.

You can also add a referral button to your blog. Add this shortcode to your WordPress messages and pages to display the random message button.

[redirect_to_post_button]

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

We hope this article has helped you redirect users to a random message in WordPress.

Get real time updates directly on you device, subscribe now.

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More