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 Appearance, and then click 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.

Usamos cookies con el fin de personalizar para usted nuestro sitio Web y analizar el uso de éste. Usted acepta esto haciendo clic en “Acepto” o al continuar usando el sitio Web. Hay más información sobre cookies en nuestra política de privacidad.