Created
March 26, 2018 18:58
-
-
Save carlosvarela/e6cdefa5842604b22abb0c741fc636e1 to your computer and use it in GitHub Desktop.
WordPress Redirect Home After 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
/* add in your functions.php */ | |
add_action('wp_logout','auto_redirect_after_logout'); | |
function auto_redirect_after_logout(){ | |
wp_redirect( home_url() ); | |
exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment