Login only redirect
-
I haven’t found any plugins that redirect all pages except the forgotten password url.
I’ve been trying to use:
global $wp; $current_url = home_url(add_query_arg(array(),$wp->request)); if ( !is_user_logged_in() && $current_url !== wp_lostpassword_url() ){ auth_redirect(); }
But then it stops loading the rest of the code.
I thought return; would continue loading, but I was apparently mistaken.
What am I doing wrong?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Login only redirect’ is closed to new replies.