In a recent project for a client, I needed to prevent non-admin users from adding new categories from the post editor screen. By default, WordPress allows users with admin and editor roles to manage categories and in this tutorial I’ll show you how to prevent editors from adding new categories.
For this one specific case, I wanted to remove the ability for editors to add new categories since I do not want them to mess up with all other configurations have been made to the site. To prevent editors from adding or creating a new category, you can remove the manage_categories
role from editor role. For more on this, please refer to Roles and Capabilites page on WordPress Codex.
If you prefer non-coding solution, luckily there’s a way. You might want to use User Roles Editor plugin as we mentioned last week.
Simply go to Users > Users Role Editor. On the settings page, from the dropdown, select Editor (editor) option. Then, look for manage_categories
and untick/uncheck it. You’re done!
If you want to check whether this works, simply create a new user account and assign an editor role to it. You’ll see that the + Add New Category link has been removed.
We hope this tutorial helped you to remove prevent editors from adding new categories. Depending on your needs, you may want to add or remove other capabilities for the editors. This tutorials also shows how easy and flexible WordPress is to manage different levels of users. Don’t forget to follow our Twitter and Google+ to get notified about our upcoming WordPress tutorials.
Leave a Reply