By default, the platform does not have this option. You can use the following function code to restrict user to WP admin page.


 Please follow the steps below:


1. Go to Appearance > Theme 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 code just before the closing PHP tag “?>”:


function bb_restrict_admin_only() {
        if ( ! current_user_can( 'manage_options' ) && ( ! wp_doing_ajax() ) ) {
                wp_safe_redirect( site_url() ); 
                exit;
        }
}
add_action( 'admin_init', 'bb_restrict_admin_only', 1 );

5. Click Update File to save the changes.


Note: Any modifications are considered as custom work already. Know more about our Support Policy here: https://www.buddyboss.com/support-policy/