Allow Administrator role access to custom capabilities [duplicate]

This question already has an answer here: Apply custom role capabilities to administrator (without plugin) (1 answer) Closed 9 years ago. I’m currently developing a WordPress business directory plugin with a ‘business’ custom post type. I have it creating a custom ‘business_author’ user role on activation and assigning specific capabilities to that role but it … Read more

Unify the roles and caps?

I installed several plugins(buddypress-docs,achievement,bbpress), each one create capabilities for their own post_type. I would prefer to make all roles and capabilities unified into one system, Is there a solution to overwrite all existing caps and control all post_types? Eventually I would like to organize users by group, and assign each user group different caps across … Read more

Conditional based on the User Role of the Current Profile the user is viewing – BuddyPress [closed]

Closed. This question is off-topic. It is not currently accepting answers. Your question should be specific to WordPress. Generic PHP/JS/HTML/CSS questions might be better asked at Stack Overflow or another appropriate site of the Stack Exchange network. Third party plugins and themes are off topic. Closed 7 years ago. Improve this question I’m using BuddyPress … Read more

Only allow administrators and editors to access wp-admin

I am trying to restrict access to wp-admin so that only administrators and editors are allowed. At the moment I am using this function: function restrict_admin(){ //if not administrator, kill WordPress execution and provide a message if ( ! current_user_can( ‘manage_options’ ) ) { wp_die( __(‘You are not allowed to access this part of the … Read more

Users with custom roles can’t read each other’s comments

My site has a custom role (“coach”) with its own set of capabilities (via map_meta_cap along with a few built-in roles). Each user is assigned a page on the site that they “own” and can edit (via a front-end editor). Each page has comments (rebranded as “reviews”). This system works pretty well, except for one … Read more