Please be advised that there's currently no out-of-the-box option to do this in BuddyBoss. Modifications are typically considered custom work, but we are making an exception in this case. Kindly check our Support Policy here: https://www.buddyboss.com/support-policy/.
To restrict logged-in users from accessing the home page, you can use a function in the child theme's functions.php file.
With this code, once someone tries to access the home page, they will be redirected to another page (which you specify by replacing 'profile' with the desired URL slug).
1. Go to Appearance > Theme File Editor
2. Under “Select theme to edit”, choose (BuddyBoss Child/Whatever theme is active), then click “Select”.
3. Below Theme Files, select Theme Functions (functions.php).
4. Append the following just before the closing PHP tag “?>”:
function redirect_logged_in_user_to_profile() {
// Check if the user is logged in and trying to access the home page
if (is_user_logged_in() && is_front_page()) {
// Redirect to the page (replace 'profile' with the actual slug of your profile page)
wp_redirect(site_url('/profile'));
exit;
}
}
add_action('template_redirect', 'redirect_logged_in_user_to_profile');
NOTE: Please make a backup of your site.
// Check if the user is logged in and trying to access the home page
if (is_user_logged_in() && is_front_page()) {
// Redirect to the page (replace 'profile' with the actual slug of your profile page)
wp_redirect(site_url('/profile'));
exit;
}
}
add_action('template_redirect', 'redirect_logged_in_user_to_profile');
NOTE: Please make a backup of your site.
5. Click “Update File”.
Did you find it helpful? Yes No
Send feedbackSorry we couldn't be helpful. Help us improve this article with your feedback.