Home Forums Plugin Support WP User Frontend Pro About Admin area access for guests

This topic is: not resolved

This topic contains 8 replies, has 2 voices, and was last updated by  MOHO 3 years, 9 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #53888

    MOHO
    Member
    Post count: 10

    I don’t want to Enable “Admin area access” to block specific user role to WordPress admin area.
    I hope that the guest could view /wp-admin page ( don’t lock )
    How could i disable “Admin area access” function?

    Thanks

    #53913

    Nayem
    Moderator
    Post count: 6480

    Hello Moho,

    Actually you need to add some code for this. Now please tell me specifically for which role you want to show the admin bar?

    Thanks.

    #53957

    MOHO
    Member
    Post count: 10

    Hi

    I don't want to lock my admin, this will happened “CPU 100%”….

    I hope that remove the lock limit, and then everyone could view the wp-admin page.

    I don't need any role just for the guests.

    Thanks

    #53993

    Nayem
    Moderator
    Post count: 6480
    function add_admin_caps() {
        $role = get_role( '###');
        $role->add_cap('delete_artists');
        $role->add_cap('delete_published_artists');
        $role->add_cap('delete_others_artists');
        $role->add_cap('edit_artists');
        $role->add_cap('edit_published_artists');
        $role->add_cap('edit_others_artists');
        $role->add_cap('publish_artists');
        $role->add_cap('read');
        $role->add_cap('upload_files');
        $role->add_cap('manage_artist_categories');
    }
    add_action( 'admin_init', 'add_admin_caps');

    *** Please replace ### with the role you want to add access of administrator. 🙂

    #55615

    MOHO
    Member
    Post count: 10

    Could i disable block specific user role to WordPress admin area?

    I don't want to block, i want to open.

    #55622

    Nayem
    Moderator
    Post count: 6480

    I have provided you the code. So please mention the role name get_role( ‘###') to enable admin panel. I have tried to help you. Now if you want more than please hire a developer to do this for you.

    Thanks.

    #55623

    MOHO
    Member
    Post count: 10

    OK, so i need to create the specific user role for the guests ?

    #55625

    Nayem
    Moderator
    Post count: 6480

    Guest is a role for user. You can insert this role also there. Now when your user will register in your site they will get a user role so you can enable wp admin for that role.

    #55633

    MOHO
    Member
    Post count: 10

    OK! I got it!

    I will try, thanks.

Viewing 9 posts - 1 through 9 (of 9 total)

The topic ‘About Admin area access for guests’ is closed to new replies.