Last active
August 29, 2015 14:00
-
-
Save bryanmonzon/11307029 to your computer and use it in GitHub Desktop.
I need to redirect people from a page if they're logged in. I'm not sure if hooking into 'wp' is the best way.
This file contains hidden or 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
function nam_redirects() | |
{ | |
if( is_page('register')) { | |
if( is_user_logged_in() ) { | |
wp_safe_redirect( '/network' ); | |
} | |
} | |
} | |
add_action( 'wp', 'nam_redirects' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment