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

(using scribu's front-end-editor)

Currently I have several custom fields and taxonomies that appear on posts as they are created by users. Each author is able to edit only their own posts.

However, there is one taxonomy (or custom field) that needs to only be editable by admins or editors and NOT authors.

What would I need to do to disable this particular taxonomy (or custom field)?

share|improve this question
Currently I am using this: if (current_user_can('editor') || current_user_can('administrator')){ however, everyone is able to edit the field when set like this.. if I change it however like this if (!current_user_can('editor') || !current_user_can('administrator')){ nobody can edit it... Any ideas? – drew Oct 25 '11 at 19:00

A "current user can" condition should hide the entire input field.

This is a simple condition i have just checked to be sure:

                if(current_user_can('administrator')) {
                echo 'You are the boss';
                } else {
                echo 'Please Log in';

if that kind of condition surrounding that input field it should hide it completely from user that are not the admin.

share|improve this answer

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.