In this specific case, it seems the multiple taxonomies have a clear hierarchical relationship.
Rather than a unique taxonomy for building 1, building 2, etc., these can all be located in a single “Buildings” taxonomy that is hierarchical like this:
- Buildings Taxonomy:
- Building 1
- Floor 1
- Floor 2
- Floor 3
- Building 2
- Floor 1
- etc.
- Building 1
This means that there’s only ever one taxonomy to query with get_terms()
. As a bonus, it makes it easy to final all posts on all floors in Building 1 or all floors in Building 2.
Related Posts:
- Display category posts grouped by taxonomy
- Is there a way to ‘Lock’ a Taxonomy?
- get_query_var(‘paged’) always returns empty
- Return only the custom sub-term for custom post type, do not echo term-parent
- wp_insert_term is adding a term that has no name
- Get total number of comments from posts in a specific custom taxonomy
- Display one post from each term in a custom taxonomy [closed]
- Displaying the Name of the Queried Taxonomy Term on a Term Archive Page?
- Connect Users and Taxonomies
- WordPress json api taxonomy index method
- get_terms showing link to category even if all posts are drafts
- How to restrict on selecting child taxonomy
- Post tags saving as both tag name & tag ID on post update when tags are displayed as checkboxes
- Retrieving custom taxonomy in order, but excluding specific tax IDs
- Sort Custom Taxonomy Terms in admin by custom order
- Taxonomy query for children of parents
- how to get title to custom tags page
- Change in custom taxonomy permalink causes 404 error for another custom taxonomy
- Display sub-taxonomies based on SELECTED parent-taxonomy
- Checking if a Page has an Associated Term?
- Displaying ACF image field [closed]
- How get custom field from custom taxonomy?
- How to redirect custom post type archive to first term of associated taxonomy?
- Taxonomy.php issue with search and filters
- Refresh Taxonomies
- Get Bottom Most Level Taxonomy Terms?
- Share taxonomy between user and posts?
- Displaying custom taxonomy terms active trail
- get_term_children doesn’t return an array of children terms
- List Recent Post Titles from Custom Taxonomies?
- Get taxonomy parent using child slug (from merged taxonomies)
- add taxonomy as one of menu items
- Creating a custom search form
- One query to get posts and their taxonomy terms
- Conditional display for custom fields/taxonomy
- How do I keep the page I’m on within the URL when running a search on a taxonomy?
- problem in taxonomy-{taxonomy}.php pagination
- wordpress testimonials
- List Posts For Terms Of A Custom Taxonomy For Any Post Type
- Query posts from a child taxonomy term id
- get_terms() duplicate first term of a custom taxonomy
- Retrieving only custom post types with two required terms (from diferente custom taxonomies each)?
- Best structure for entering recipes in a WordPress theme?
- Get posts by Taxonomy without terms
- Is this the proper way to get a taxonomy description into a post template?
- Output single post custom taxonomy child terms
- Admin (All posts) stop responding problem
- Why get_page_template() doesn’t show taxonomy template file name?
- Website loading slowly – Advanced Custom Fields images
- How to check if a post has at least 2 terms from a custom taxonomy attached?
- Removing custom taxonomies from the admin menu
- Custom post type Category Display
- Custom Taxonomy template not display
- delete term from taxonomy and assign in new one
- pre_get_posts post_meta event
- How can I add a custom permalink to a term?
- Adding Child Terms Programatically – No Warning but No dice either
- Custom taxonomy display name issue
- Variable Not Working Inside is_author() Array
- Template file renders on local install, not on web
- How can I get Taxonomy Images to work with ‘orderby’ argument?
- How do I hide a term from non-admin users in get_the_term_list?
- Set post terms by term id
- Query Results not being displayed please help
- Can I output a custom taxonomy as a submenu in the site navigation menu?
- Sort taxonomy page alphabetically by meta rather than default post date
- Random category URLs not working
- Custom taxonomy throw error 404
- using wp_insert_term to create custom terms for a custom taxonomy from frontend form,
- Get Terms of custom Taxonomy of products with certain Product Category
- Problems using get_the_terms in a plugin
- Clean Taxonomy terms in new post type wordpress
- add pagination in wordpress page template
- How to exclude the common terms?
- Custom dropdown list taxonomy not saved
- WordPress taxonomy terms archive template help
- How to get all the terms from a custom hierarchical taxonomy via REST api?
- Remove taxonomy name and add .html extension in the custom taxonomy term URL
- Custom taxonomy shows full articles
- Pagination for Custom Taxonomy
- Can I make a taxonomy meta box into dropdowns for each parent category?
- wp_insert_term doesn’t work with custom post type’s tax
- Post not showing in my custom advanced search
- custom taxonomy not displaying
- Attaching meta box to specific category/taxonomy in custom post type
- Change Permalink to Value of Custom Field
- Custom taxonomy list in two columns
- Display custom post taxonomies
- get multiple values from $_GET from multiple checkboxes
- Custom Taxonomy type in nav menu
- Using wp_query is it possible to orderby taxonomy?
- Way to organize content – custom taxonomies or other way?
- Using post type archive page for taxonomy archive
- Custom Fields link to other pages, not search
- Taxonomy archive link from term id
- Add Gutenberg editor to edit taxonomy (category) page
- post_type_link not working for posts without terms
- Why my archive title isn’t showing?
- Two taxonomies with the same slug
- Hook function when taxonomy terms change