(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)?

  • 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, 2011 at 19:00

1 Answer 1


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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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