Created
January 30, 2018 07:18
-
-
Save jerrickhakim/39028b7648e0fcb08a0ebacc4c885ded to your computer and use it in GitHub Desktop.
Paste this code in the functions.php file in your child theme to choose where you would like your visitor to be redirected after they logout.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* WORDPRESS REDIRECT ON LOGOUT */ | |
add_action('wp_logout','auto_redirect_after_logout'); | |
function auto_redirect_after_logout(){ | |
wp_redirect( home_url("/login") ); | |
exit(); | |
} | |
/* END WORDPRESS REDIRECT ON LOGOUT */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment