How To Remove The “+ Add New Category” Link From A Category Metabox

The default metaboxes are registred in the file wp-admin/includes/meta-boxes.php. There you can find the function post_categories_meta_box() which will generate the taxonomy metabox. Currently there is no hook available to filter the output. But you can do one of the following:

  1. Use remove_meta_box() to remove the existing category metabox and register your own with add_meta_box(). Copy&Past the existing code to your new metabox function and remove the code block from line 345 to 367.
  2. The cleaner way: Remove the edit_terms capability from your user roles with remove_cap(). If you look in the metabox function, on line 345 you can see an if-statement which checks if the user has the capability edit_terms. If so, the + Add New XY will be displayed. Problem here, the name of the capability is dynamic and could be anything. If someone registers a taxonomy with a different capability naming, this will probably not work (untested).

Leave a Comment