Registered user redirect to custom page
-
Hi, I need a little direction here please.
When a logged in user tries to go to the register page they are by default sent to the home page – usual BuddyPress behaviour I understand. However, I want to redirect them to a custom page which tells them they are logged in and gives them options of going to pages on the site via links. I have found come which sets up a conditional redirect if the user is already logged in – but it does’t work. I want to send people to this page http://findaukexpert.com/expert-already-logged-in/ and i have used the following code.
function bbg_bp_loggedin_register_page_redirect_to( $redirect_to ) {
if ( bp_is_component_front_page( ‘register’ ) )
$redirect_to = bp_get_root_domain() . ‘/expert-already-logged-in/’;return $redirect_to;
}
add_filter( ‘bp_loggedin_register_page_redirect_to’, ‘bbg_bp_loggedin_register_page_redirect_to’ );Any input would be fantastic. Thank you!
- The topic ‘Registered user redirect to custom page’ is closed to new replies.