I have run into similar problem with the system I am currently building – I needed ZIP codes to be children of Cities, which were to be children of States. What I have learned is that it was possible to add custom fields to the term creation form to link the term (e.g. ZIP) to the parent term from Cities taxonomy, but it was not an ideal solution.
What I have end up with was just one hierarchical taxonomy Location, were first level terms are always states, second level terms were cities and third level were ZIP codes. Of course, there is nothing that stops users from submitting ZIP code as top-level term, but I am hoping that my users are not dumb enough to do that. 🙂 I have then built a number of supporting functions to determine what is the hierarchy level of given term.
Related Posts:
- How to prevent new terms being added to a custom taxonomy?
- How to add images to taxonomies?
- Read-only taxonomy (user can assign term but can’t create or edit existing terms)
- Can you add the visual editor to the description field for custom taxonomies?
- Adding Category/Tag/Taxonomy Support to Images/Media
- Include and Exclude Taxonomies From Archives & Feeds Using ‘pre_get_posts’
- Taxonomy menu with post count and multiple parents
- Sort Custom Post Type Archive by Taxonomy Term [duplicate]
- Large taxonomy (2000+ terms), causing WordPress to hang
- Is it possible to have a taxonomy archive that lists taxonomy terms?
- Check if current term is a child of another term
- Archive template for taxonomy terms
- pre_get_posts OR relation between taxonomy and author
- Non-hierarchical custom taxonomy using checkboxes on edit-screen -> saving issue
- Dynamic page slug for Custom Taxonomies?
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- show term description instead of list terms of custom taxonomy
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- Exclude Custom Taxonomies
- How to get the top most term (top ancestor) of a custom taxonomy child term?
- get_the_term_list without specific category
- Add Category Name to REST API
- Display the Terms from a Custom Taxonomy Assigned to a Post(inside the loop) in Hierarchial Order
- Edit post meta with checkboxes on front end
- Set download limit and expiry for WooCommerce downloadable products in specific categories
- How to display custom taxonomy in multiple columns?
- Custom taxonomy sort by term meta in admin columns
- Storing data into custom taxonomies VS post custom fields (post meta)
- How to order a list of taxonomy terms alphabetically?
- WordPress Custom Taxonomy – Volume / Issue – Unique Slug Issue
- get_the_terms issue
- How to show the entries in a custom taxonomy by author?
- ACF vs Taxonomies
- Reverse traversing taxonomy based on term_id
- ‘wp’ action hook not firing in admin and login?
- Correct way to insert taxonomies on page insert
- Styling Taxonomy Terms Individually
- Get terms cross-taxonomy query
- Custom Taxonomy Template Error: Catchable fatal error: Object of class WP_Error could not be converted to string
- Custom Taxonomy in default RSS feed
- Taxonomies on custom taxonomies
- Get list of taxonomies associated with Subscribers
- How to add Post Format Taxonomy Archive page in the menu?
- How to add custom label or texts in featured image
- Create Geographical regions -> countries structure and relationship with taxonomies
- Unexpected results from get_taxonomies() and {$taxonomy}_edit_form and related hook
- Create custom taxonomy and Display in metabox dropdown
- Strip tags from a the terms() function
- Why can’t I use an array of term slugs in WP_Query?
- Using wp_dropdown_categories in widget options
- Trying to add taxonomy to get_categories() but it’s not working. How to fix this?
- Proper WP conditional tag to check for existing taxonomies to list out terms with wp_list_categories?
- Custom taxonomy archive page requires ?post_type= in url
- Twin value tags as an esoteric taxonomy
- Clean Custom URL for Serach + Custom Taxonomy
- Advanced search redirecting to another page then filter further
- Filter through custom taxonomy with an array of taxonomy IDs
- Add attribute taxonomy through code don’t appear in admin product page
- Custom arguments in WP_Query
- save custom term – hook create_term doesn’t work
- Several taxonomy query (like filter)
- Taxonomy Overview Page?
- How to avoid foreach error WebDevStudio’s WDS_Taxonomy_Radio taxonomy metabox class?
- Search box with field hidden till drop down selection is made
- Can You Build Page Templates Without Extra Files
- How do i make this Taxonomy term code work?
- Unable to get the Parent Custom Taxonomy Terms
- Unsetting post_tag taxonomy breaks term description for other taxonomies
- Taxonomies on Pages with Custom Formatting
- Catch all taxonomy template
- Custom taxonomy huge list not loading properly in select box
- Query Multiple Custom Taxonomies
- Is there a way to nest taxonomies or custom fields deeper than one level below the post type?
- Prioritise Pages over Taxonomy Term Root Archive, but not Taxonomy Term Child Archives
- Showing custom taxonomy in woocommerce signle product page
- Main query disturb pre_get_post by category query
- Is it possible to filter a taxonomy archive by other taxonomies that are on posts?
- Get custom taxonomy terms that contain posts that have another taxonomy term
- How to create a completely functioning separate archive for posts from only 1 or 2 specific categories
- Make relation of custom taxomies
- Using wp_tag_cloud with only current post tag with special class
- Creating a list with multiple categoreis and options
- Next/Previous links in custom taxonomy, where item may belong to multiple terms
- Custom taxonomy page uses index.php
- Custom Taxonomy + JQuery Tabs
- Function code problem
- Permalinks not working on MU network with domain mapping
- Create WordPress taxonomies based on theme settings
- Alternative for is_taxonomy() to workaround theme’s default sidebar
- Get custom taxonomy term url on archive page
- I’ve got a function that auto creates taxonomy terms – Can it auto delete them as well?
- Get custom taxonomy value of post and output posts in same taxonomy
- Head Code for Custom Taxonomy
- Adding new terms to custom taxonomy
- List posts grouped by children of a custom taxonomy
- Search and filter with custom field in taxonomy
- is_tax not working for custom taxonomy
- Custom taxonomy with custom meta value is not sorting correctly (query returns the same value for orderby regardless of sort column click)
- wp_add_object_terms cant recognize a post ID
- Foreach for get_the_terms for hierarchical taxonomy don’t repeat Top Level Terms if contains multiple Second Level Terms