WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For one of my custom post types I want a specific user to be able to edit existing posts created by admin but not be able to Add New posts.

How can this be done?

If I define the user role as not being able to Publish it still allows them to add a new post and submit for review.

share|improve this question
up vote 3 down vote accepted

You will have to do something like this:

function hide_buttons() {
    global $current_screen;

    if($current_screen->id == 'edit-post' && !current_user_can('publish_posts')) {
        echo '<style>.add-new-h2{display: none;}</style>';  

See: http://erisds.co.uk/wordpress/spotlight-wordpress-admin-menu-remove-add-new-pages-or-posts-link for reference

share|improve this answer
Perfect, thanks – fxfuture Sep 29 '10 at 22:49
You are welcome. – sorich87 Sep 29 '10 at 23:37
One caveat here: The user will still be able to add a new post if they go to the page directly, this just removes the button, not the user's capability to add new posts. – ezekielDFM Feb 10 '14 at 14:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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