O'Reilly logo

WordPress Plugin Development Cookbook by Yannick Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hiding the category editor from the custom post type editor

As we have seen in the previous recipe, when we associated a new taxonomy with the Book Review custom post type, the show_ui option controls the visibility of the taxonomy assignment meta box and the admin menu link to the taxonomy editor. In some cases, it is desirable to give users access to the full taxonomy editor but only let editors choose from a controlled drop-down list when they create new entries in the custom post type editor.

This recipe shows how to hide the taxonomy interface and create a new menu item to still have access to the book type editor. It also shows how to update the custom post type meta box created in the previous recipe to assign a type to new Book Reviews ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required