2

I have used this code;

$roleObject = get_role( 'editor' );
if (!$roleObject->has_cap( 'edit_theme_options' ) ) {
    $roleObject->add_cap( 'edit_theme_options' );
}

to add menu access for editors.

I have a custom post type 'Masterclasses". That appears correctly in the Administrator's Menu editing page but doesn't appear in the Editor's Menu editing page.

How do I add this?

3

As ever, when you know the answer it's maddeningly simple. The custom post types were there all along, together with their taxonomy. All posts are absent from the menu editor and have to be turned on in Screen Options.

I pressed the button and lo, there they were.

  • Thanks, this is non-obvious as hell UX. The CPT boxes do not seem like meta boxes, which you would expect Screen Options to control. – lkraav Feb 14 '17 at 19:51
0

You can try giving capabilities for something like add_cap( 'edit_Masterclasses' )

For more you can refer to this documentation http://codex.wordpress.org/Roles_and_Capabilities#Editor

  • Half the problem (when searching for this online) is the confusion between this capability - to edit the custom post type - they already can. What I need is to add the Masterclasses to the Appearance-menu possibilities. Admin can Editor can't – Chris Pink Aug 7 '14 at 8:53

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.