After logging, your plugin redirects people to their profile. Is there a way to redirect users if they are logged in to their profile every time they go to the homepage. This is kind of similar to Facebook.
Figured out a way to work with it. Still up for solving if you’re interested
Hi Christopher,
good to know that you have figured it out
Here is some code that will do the sameadd_action( 'template_redirect', 'buddydev_rediretc_to_profile' ); function buddydev_rediretc_to_profile() { if ( is_user_logged_in() && is_front_page() ) { wp_safe_redirect( bp_loggedin_user_domain() ); exit( 0 ); } }
Hope that helps.
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic.
This topic is: not resolved