Created
March 22, 2022 08:25
-
-
Save Oscar-Abad-Folgueira/84ddbdb386a044935f0362f4655e14b5 to your computer and use it in GitHub Desktop.
WordPress Snippet: Redireccionar al salir (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
<?php | |
/** | |
* @snippet WordPress Snippet: Redireccionar tras salir | |
* @author Oscar Abad Folgueira | |
* @author_url https://www.oscarabadfolgueira.com | |
* @snippet_url https://oscarabadfolgueira.com/ | |
*/ | |
add_action('wp_logout','oaf_redirect_after_logout'); | |
function oaf_redirect_after_logout(){ | |
$inicio = home_url(); | |
wp_redirect( $inicio ); | |
exit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment