0

Sorry for my English first.

What I want to achive is, that it is possible to change existing posts and not possible to add New Posts for the user role "Editor". Is it possible with wp caps or do I need a ugly JS-Hack... to achive this?

Hi there. Did i missed something? What I've done so far

function fsi_remove_addCap() {

        global $wp_roles;
        $wp_roles->add_cap( 'editor', 'create_pages' );
        $wp_roles->remove_cap( 'editor', 'edit_pages' );

}
add_action( 'init', 'fsi_remove_addCap' );

Result: It's impossible to edit existing pages too.

  • 1
    Check out this plugin wordpress.org/plugins/user-role-editor – Pratik Patel Oct 17 '18 at 11:27
  • 1
    Existing posts of the author itself, or all existing posts? – Pim Oct 17 '18 at 11:31
  • @PratikPatel: Thanks for your hint. I did. There is a create post cap, but no create page cap. So I think, this will not work for my aims... . – Friedrich Siever Oct 17 '18 at 11:34

Your Answer

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

Browse other questions tagged or ask your own question.