sakarya escort bayan sakarya escort sakarya escort sakarya escort serdivan escort webmaster forum
sakarya escort kayseri escort nevsehir escort denizli escort izmit escort diyarbakır escort buca escort rokettube
sakarya escort sakarya escort bayan adapazarı escort Sakarya Escort Sakarya Escort Bayan Adapazarı Escort
ankara escort bayan ankara escort bayan ankara escort
How To Auto Redirect Users After Logout In WordPress - WpDevcodes 
sakarya escort bayan sakarya escort sakarya escort sakarya escort serdivan escort webmaster forum
sakarya escort kayseri escort nevsehir escort denizli escort izmit escort diyarbakır escort buca escort rokettube
sakarya escort sakarya escort bayan adapazarı escort Sakarya Escort Sakarya Escort Bayan Adapazarı Escort

How To Auto Redirect Users After Logout In WordPress

How To Auto Redirect Users After Logout In WordPress

Here is a useful trick If you’re trying to developing a WordPress website .And you would like to manually redirect users after logout of your WordPress website. As a default, WordPress will redirect them to the WordPress login (http://www.test.com/wp-login.php) page on your website. In this tutorial we will show you how can easily change it by adding following snippet to current theme’s functions.php file:

add_action('wp_logout','auto_redirect_after_logout');
function auto_redirect_after_logout(){
  wp_redirect( home_url() );
  exit();
}

Using above code user will redirect to the homepage of your website. If You want to define define custom URL or external URL you can get this done easily. Find the following snippet below:

add_action('wp_logout','auto_redirect_external_after_logout');
function auto_redirect_external_after_logout(){
  wp_redirect( 'http://wpdevcodes.com' );
  exit();
}

How To Auto Redirect Users After Logout In WordPress