How to redirect new users to a default page on WordPress

You can redirect newly registered users to a simple thank you page, a blog section or any specific on your WordPress site with a simple code snippet without any plugin. This article gives you a step by step guide on redirecting your newly registered users to the WordPress blog section.

How to add a shortcode to redirect new users 

To redirect new users to a designated page, follow these steps:

  1. Log in to your WordPress site with an administrator account.
  2. On the Dashboard in the left sidebar, click on Appearance , and then click on Editor:

  3. Access the functions.php file for the Theme.Click on Edit and add this code snippet at the bottom: 

    function redirect_to_blog(){ return home_url( '/blog/' ); } 
    add_filter( 'registration_redirect', 'redirect_to_blog' );
  4. The above function is basically going to redirect all the new registered users right after the successful registration to the URL slug /blog/.Save the file. 

 
Get WordPress Hosting

Article Details

Other Articles in This Category

Show More

Did you find this article helpful? Then you'll love our support. Experience the A2 Hosting difference today and get a pre-secured, pre-optimized website. Check out our web hosting plans today.

We use cookies to personalize the website for you and to analyze the use of our website. You consent to this by clicking on "I consent" or by continuing your use of this website. Further information about cookies can be found in our Privacy Policy.