Allow role to delete posts but block him the wp-admin
Assuming you’re talking about a custom user role named “photographer“, I believe something like this should add the delete_posts capability to that role. function add_delete_cap_to_photog_role() { $role = get_role( ‘photographer’ ); $role->add_cap( ‘delete_posts’ ); } add_action( ‘admin_init’, ‘add_delete_cap_to_photog_role’); After adding the caps to the role, to solve the rest you could either keep blockusers_init and … Read more