This topic contains 8 reply and 2 voices, and was last updated by MOHO 4 years, 3 months ago
Viewing 8 Posts - 1 through 8 (of 8 total)
Author Posts
July 1, 2015 at 2:16 pm 53888
MOHO 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
July 1, 2015 at 3:36 pm 53913
Nayem Nayem

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.

July 1, 2015 at 7:14 pm 53957
MOHO MOHO

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

July 2, 2015 at 10:23 am 53993
Nayem Nayem
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. 🙂

July 14, 2015 at 12:28 pm 55615
MOHO MOHO

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

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

July 14, 2015 at 12:57 pm 55622
Nayem Nayem

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.

July 14, 2015 at 12:58 pm 55623
MOHO MOHO

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

July 14, 2015 at 1:00 pm 55625
Nayem Nayem

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.

July 14, 2015 at 1:01 pm 55633
MOHO MOHO

OK! I got it!

I will try, thanks.

Viewing 8 Posts - 1 through 8 (of 8 total)