I would like to hide the “add new” button from my custom post type. I tried doing this : (from this answer)

    'capability_type'       => array('place', 'places'),
    'capabilities' => array(
        'create_posts' => 'false',
    'map_meta_cap'        => true,

This works fine and it hides the button, however I am not allowed to access my custom post types any more. I would like to be able to only edit private posts but not be able to publish or create.

If I try to access to my private post by copy/past the url, it works. But listing(or reading) the posts doesn’t work.

My question is, am I even allowed to edit my private posts and access them if I can’t create_posts ? It seems that in order to read or list the posts I need to have access to “edit_posts” before. I am getting confused any help will be much appreciated.

Read more here: How can I remove "Add new" button on custom post type


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: