Redirecting new users to a default page on WordPress

Learn how to direct your new users to an important conversion page on your WordPress Site. This article shows you how to get your new users after registration to a blog section with a simple code PHP code snippet.

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' );
  1. 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.

 

Related Articles