-
-
Save michaelbeil/7a9fa152ded9f9037e07f55816ca7ffb to your computer and use it in GitHub Desktop.
Redirect users to a specified page when logging out of your PMPro site
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 // DO NOT COPY THIS LINE | |
//copy lines 5 onwards into your active theme's function.php or custom plugin for code snippets. | |
function mypmpro_redirect_logout(){ | |
wp_safe_redirect( '/contact/' ); // use this line to redirect to a specific page on your site | |
} | |
add_action('wp_logout','mypmpro_redirect_logout'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment