How to redirect visitors to a random post in WordPress

How to redirect users to a random post in WordPress

Want to redirect your visitors to random post?

It helps allow your website’s visitors to explore older articles and go through the posts that’re hidden in blog archives.

In this article, you will learn how to redirect users to a random post in WordPress (step-by-step).

Why Should You Redirect Visitors to a Random Post in WordPress?

By default, WordPress shows all your blog posts in reverse chronological order. All posts appear from newest to the oldest. So, the visitors of your website will read the newest posts first.

And, if your website contains huge content, then chances are that your visitors may not be able to discover your older posts.

Fortunately, there’s an option by which you can display random posts in your WordPress site. It will help your website’s visitor to discover old articles and increase the number of page views.

With its help, you can also redirect your visitors to a random post from 404 error pages.

So, let’s know how to redirect visitors to a random post in WordPress.

How to Redirect Visitors to a Random Post in WordPress

First of all, login to your WordPress dashboard panel. Now, go to the Plugins » Add New, then search for “Random Post” plugin.

Now, you just need to install and activate the Redirect URL to Post WordPress plugin.

Random-Post-Plugin-WordPress

Once you activate this plugin, it will show that this plugin doesn’t have any settings. You just need to configure it entirely through the URL query parameters. (refer below screenshot)

You can use them in your posts and pages to redirect visitors to random posts, latest posts, and other older articles.

Redirect-URL-Parameters

To redirect your visitors to a random post, just copy the random post query parameter (as shown in the above screenshot) and add it in your website’s error pages and other pages as a link.

When visitors will click on the link, they will redirect to a different random post.

In addition, you can also add a button for redirection on your website or blog. For this, you’ll need to add this shortcode in your posts or pages to display the random post button.

[redirect_to_post_button]

When visitors click on this button, they will get redirected to a random post on your website.

Take Away

After reading this article, you must understood that how to redirect users to a random post in WordPress. You may also want to see How to add a PayPal payment form in WordPress. Hope, this article will prove beneficial to redirect your users to random post in your WordPress website. If you liked this article, then do not forget to share it with others.

If you still have any question, then ask in the comment box below.

RELATED ARTICLES:

Advertisement

Leave a Reply

Your email address will not be published.

77 Shares
Share
Tweet
Pin77