Here’s how I did it. Just add a conditional that checks if the page being loaded is an admin page or not. If it is an admin page, set hierarchical to false, otherwise set hierarchical to true. Like so:
$args = array(
'hierarchical' => true,
'labels' => $labels,
'show_ui' => true,
'query_var' => true,
'rewrite' => array(
'slug' => 'genre'
),
)
if( is_admin() ) {
$args['hierarchical'] = false;
}
register_taxonomy('genre', array('book'), $args);
That should give you the idea. The downside to this is you can’t add parent relationships to terms using the admin interface. You could get more specific in the is_admin()
conditional such as looking to see if the request contains post-new.php
or post.php
…
Related Posts:
- Can’t custom taxonomies have same terms (slugs) as categories?
- Checklist of selected categories
- Using URL parameters, list posts from category and custom taxonomy
- Are Categories, Tags and Custom Taxonomies any different in regards to SEO?
- Moving Categories submenu to Media, but still opens Posts menu
- add slug beside name in Admin Category Checklists
- Echo text using is_tag
- When creating a new product, auto assign it to all custom taxonomy woocommerce
- Using heirarchial tags or Custom taxonomies
- How to assign Categories and tags inside the TinyMCE Editor for each Image?
- How to exclude category and post_tag taxonomy while displaying custom taxonomy?
- Control term order on a per-post basis
- Rewrite URL with category and tag combined using WP_Rewrite
- How to tax query X number of posts related by tag first, then by category if not enough in tag-related
- Create subdomains for tags and categories
- How to convert regular categories to custom taxonomy?
- How to totally get rid of Category in my blog?
- Showing all the posts in one page?
- Is it possible to put tags and category information in the post as text?
- Getting WordPress custom taxonomy/category?
- Script to duplicate categories as tags
- Order Taxonomy Term by date created
- How to get the number of child categories a specific parent category has?
- display most popular tags of category?
- Render Selected Categories in Admin Edit Post Screen differently
- Can paginate_links() be customized for a specific category or tag?
- How can I convert some categories to a custom taxonomy?
- Any way to assign Post Categories and Tags to Links?
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- Taxonomies for WordPress Media Library [duplicate]
- How to change number of items on add new pluggins page from backend?
- Should the actual /category/ directory be 404? Is that normal WP behaviour
- How can I duplicate categories and tags?
- Random post + categories + tags
- Can you pre-check wordpress categories?
- RSS/XML of all Categories and/or Tags
- How to get the id from the custom category?
- Get Tags specific to Category using WooCommerce plugin
- How to filter out Categories for specific post types on WordPress Admin?
- Automatically exclude categories from metabox based on title
- WordPress admin categories sort show is wrong
- Needing a snippet for listing category specific tags
- How to organize custom categories for filtering and selecting
- How to display categories which contains particular tag?
- Custom sub taxonomy order by
- How to list categories within tags?
- Categories overview that links to page displaying posts
- How to “group” (categorize) the Pages together?
- Is There a Difference Between Taxonomies and Categories?
- How can I edit the ‘Most Used’ tab in the categories meta-box to show another custom taxonomy?
- Use Tag input metabox style for Categories
- Get all media categories
- WP admin broken. Not saving catgories or adding categories to menu
- Custom SQL Query: Get all posts with category id and a concated list of tags on each post
- Have multiple category queries from the URL been fixed yet?
- Related Tags not in category
- Why custom taxomony not showing when create a post?
- scaleability of tags
- How do I add a tag slug to a category URL to filter posts?
- Show the amount of posts in a tag in a specific category has
- The Difference Between Categories and Tags and Taxonomies and Terms
- Display all product tags associated with a specific product category
- How replace individual elements in the RSS feed with a single string
- Adding a H1 Tag to Post Tags automatically, but hide the tag? (Same for Category)
- Custom page category taxonomy 404
- Is it possible to create an alias/custom taxonomy for a category name?
- Showing HTML if Post is In Certain Taxonomy Term
- Conditional category & tag statement
- I need to exclude from a query a category and a few custom taxonomies
- Include either name or slug in the include parameter using wp_list_categories?
- How can I filter posts by tag on the fly
- Assign a custom post to a custom taxonomy based on custom field value
- How can I include custom category and tag base in template files?
- Custom Fields Value As Taxonomy
- How to get posts using category slug in ClassiPress?
- Custom menu with categories and tags
- List taxonomy terms assigned to a post in hierarchical view
- Page category filter in admin dashboard
- echo $category[0]-> cat_name; shows only one category name
- How can i echo next and previous custom category from a Taxonomy
- When creating category, it creates automatically tag, or, when creating tag, it creates automatically category in same name
- How to load terms of a custom taxonomy of a product in woocommerce cart page
- Category and tag urls return 404 error
- How to echo Tags and Categories as plain text
- Categories and Tags Conflict after Woocommerce Installation
- Dynamically creating content on custom URL without getting 404
- Display List of Categories Within a Custom Taxonomy
- New Category – custom taxonomy
- 404 error when i try to search by category or by tag
- How to remove specific categories from tag archives?
- List Terms by category
- A simple question regarding tags and categories
- Display related posts with same category or same tag return blank
- How can I allow people to ‘subscribe’ to categories?
- Loops in category description
- How to create a category or tag available exclusively to the admins and not to the users?
- List products from current category
- Anyway to hide a Category in the Categories section when adding/editing a post in WP Admin?
- In my wordpress admin panel Suddenly The Category, tag and featured Image Option are not showing
- Taxonomy page wpml dropdown not working