[Solved] Restricting users to a specific front end page [closed]


You’d have to add a function during the init action of WP. There you’ll get the current user and check whether they have a specific role assigned to them and redirect to the page when they do.

add_action('init', function () {
    $user = wp_get_current_user();
    $role="your role";

    if (in_array($role, $user->roles)) {
        wp_redirect('url');
    }
});

WordPress Function References:

Relevant SE posts:

solved Restricting users to a specific front end page [closed]