0

I've tried a few role plugins already: Members, User Role Editor, User Role Field Setting for Advanced Custom Fields Pro (this doesn't apply to an options page--just ACF fields on their own), Capability Manager Enhanced, and I could not get them to target the Options Pagee I created for the site in functions.php:

$acf_args = array(
    'page_title' => 'Editable Content',
    'menu_slug' => 'editable-content',
    'capability' => 'manage_options'
);

acf_add_options_page( $acf_args );

I tried adding the capability attribute but that didn't seem to allow for a specific user role to target just the Options Page. Any user role can access the Options Page--but only a specified role can edit the Options Page and nothing else in the admin. (It is ok if this specified user can view pages, posts, plugins, etc--but they can't edit, add, update, or delete anything).

Is there a way I can make this happen? Can I somehow use one of the aforementioned plugins as well as additional code in functions.php? Or am I limited to just adding something to functions.php? I've dealt with WordPress user roles in a basic sense before, but not in such a specific way like now....

0

So, I went and found a plugin called Adminimize https://wordpress.org/plugins/adminimize/ that allows me to show/hide admin menu items based on user roles. This allowed me to show the Options Page as editable for the custom user role I made but prevent them from editing other parts of the site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.