I would like to be able to force any un-registered users to the /welcome page - Currently I have set up the following:
if ( trim( $_SERVER['REQUEST_URI'], '/' ) != 'welcome' && ! is_user_logged_in() ) {
wp_redirect( home_url( 'welcome' ), 301 );
exit;
}
This automatically re-directs visitors to the /welcome page. On the welcome page I have a login form, however the users cannot login because it re-directs them back to the welcome page after they hit the submit button. How can I set it up so where they can login through the welcome page and then be re-directed to the homepage after a successful login?