I've set up some categories. I don't want users to add new ones.

How can I do this?

  • 1
    Have you tried removing the category creation capabilities from their roles? – Tom J Nowell Dec 11 '18 at 0:44

You should to remove a capability named 'manage_categories' from user role or roles, for example:

 * Don't let subscribers add/edit/remove categories.
 * You should call the function once when your plugin or theme is activated.
 * @uses WP_Role::remove_cap()
function remove_subscribers_manage_categories() {
    // get_role returns an instance of WP_Role.
    $role = get_role( 'subscriber' );
    $role->remove_cap( 'manage_categories' );
| improve this answer | |

Your Answer

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

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