Do you want to give your users a smooth login / logout experience, skipping WordPress' ugly default pages?

You can customize this experience and make sure your students never see WordPress' default pages when logging in and out of your platform, they will only see your website.

There are two ways to accomplish this:

The Simple Way

1. Download the Peter's Login Redirect plugin here.

2. Add it to your WordPress site going to Plugins in the sidebar -> Add New and dragging the file there to be added.

3. Once the plugin is installed and active, go to Settings -> Login/Logout redirects in the sidebar.

4. You can set up your redirect rules there.

A More Advanced Alternative

1. Go to your theme's function.php file.

2. Use the appropriate snippet to redirect users to your homepage or to a custom link:

Redirect to a custom URL

add_action('wp_logout','auto_redirect_external_after_logout');
function auto_redirect_external_after_logout(){
wp_redirect( 'https://www.growlearnteach.com' );
exit();
}
Redirect to homepage

add_action('wp_logout','auto_redirect_after_logout');
function auto_redirect_after_logout(){
wp_redirect( home_url() );
exit();
}
Did this answer your question?