Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)

  • yliya14
    Participant

    @yliya14

    `function wph_noadmin() {
    if (is_admin() && !current_user_can(‘administrator’)) {
    wp_redirect(home_url());
    exit;
    } }
    add_action(‘init’, ‘wph_noadmin’);

    Add this code to function.php The code redirects all users except the administrator to the main page of the site when they try to login to the admin panel

Viewing 1 replies (of 1 total)
Skip to toolbar