First, a clarification- you have one taxonomy, which contains parent and child terms.
When you associate terms to a post, only the terms you select are explicitly associated to that post.
Taxonomy terms are stored in their own table, and parent and child terms are connected to each other in this table.
This is how WordPress can query for posts that have terms that are children of other terms, it gets the children of that term from the term table, and looks for posts that also share those children.
Related Posts:
- Include and Exclude Taxonomies From Archives & Feeds Using ‘pre_get_posts’
- Check if current term is a child of another term
- How to hide custom taxonomy archives same way as hiding custom post types?
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Page queried instead of a custom taxonomy
- Using a different template per Custom Taxonomies for single term archive pages
- Creating an Archive using a Custom Taxonomy
- Display direct children of the current custom taxonomy in taxonomy.php template
- Date archive permalinks for custom taxonomy
- Taxonomy archive showing no results
- Dynamic loading of Archive content based on custom taxonomy term name
- List taxonomies according to whether this post is in another taxonomy in taxonomy archive
- orderby meta_value breaks taxonomy term archives
- Why is the custom taxonomy archive page redirecting me to a single post? [closed]
- How to have two different versions of a tag/category/taxonomy archive page?
- Automatically Give All Custom Post Types a Pre-Set Category [duplicate]
- How to add Post Format Taxonomy Archive page in the menu?
- Custom taxonomy archive shows 404 error
- Custom Taxonomy index/archive hierarchy
- Filter custom taxonomy archive posts by 2nd custom taxonomy using select dropdown
- Custom Taxonomy Term Archive Page Template that Filters 2 or more Taxonomies
- How to use multiple archive templates for a taxonomy?
- how does the wordpress rest API work
- Taxonomy archive template that shows posts from more than one taxonomy
- Custom Taxonomy List with Children
- why the archive of custom taxonomy term shows nothing?
- Can I output a custom taxonomy as a submenu in the site navigation menu?
- Add terms to a taxonomy archive from within the same taxonomy
- Custom Taxonomies Archive Page 404
- How to create archive pages for metadata query generated posts (so without taxonomy)?
- How to create a completely functioning separate archive for posts from only 1 or 2 specific categories
- How to pass posts_per_page and paged params query vars to custom taxonomy archive urls?
- Hierarchical taxonomies in permalink cause 404 for sub term archive
- How to get a terms and posts associated with another term?
- Change the Page Title of the Archive Page for Portfolio Tags
- Custom taxonomy return 404
- What’s the url queryvar for a taxnomy archive?
- Multi level archive
- Custom Taxonomy Archives Page Errors
- index.php Not Showing Custom Posts / Terms
- Custom Taxonomy Archive Page for Parents AND Children?
- Redirect or Prevent Viewing of Custom Taxonomy’s Archives?
- Creating a Taxonomy Page [duplicate]
- Exclude 2 in 3 terms of A Taxonomy from all Archives
- Insert code on specific taxonomy archives
- Permalinks not working on MU network with domain mapping
- Custom Taxonomy Archive URL rewrite
- Can you orderby slug in a taxonomy archive page using WP_Query?
- More than one Hierarchical Taxonomy and SEO
- Getting Catategory / Taxonomy Description on Non-archive Pages
- Taxonomies starting with a hyphen (minus) to assign B.C. dates to a post
- Custom taxonomy archive empty
- Why my archive title isn’t showing?
- Creating a custom archive page for WooCommerce products based on tags
- How to prevent new terms being added to a custom taxonomy?
- Taxonomy menu with post count and multiple parents
- Sort Custom Post Type Archive by Taxonomy Term [duplicate]
- Dynamic page slug for Custom Taxonomies?
- show term description instead of list terms of custom taxonomy
- Looping Through Custom Tax Terms and Displaying All Posts For Each
- Set download limit and expiry for WooCommerce downloadable products in specific categories
- Storing data into custom taxonomies VS post custom fields (post meta)
- 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
- How to add custom label or texts in featured image
- woocommerce custom product category template
- Custom taxonomy multiples
- Is there a template file to list all terms of a given custom taxonomy?
- List of users inside custom taxonomy
- Rewrite Rules returning wrong data
- Use an HTML Element To Filter Taxonomies In WP Search
- Weekdays as terms – How to order taxonomy terms by ID in admin panel?
- How to display ACF taxonomy checkbox links on WooCommerce product category archive
- Can I add other Custom Taxonomy to my syntax (functions.php)
- How to show post for a particular term of custom taxonomy?
- Is there a way to change select-list for new custom taxonomy?
- Advanced archive url structure (category, tag and date)
- How to list terms by first letter, as in A’s then B’s etc
- Taxonomy hide not working
- Can I overwrite custom taxonomy FROM “public” TO “false”
- Create new Taxonomy, add extra fields, register terms AND extra fields values?
- See double taxonomy inputs in WP editor
- How to change custom categories term links?
- Body class to each level of a hierarchical custom taxonomy
- Restructuring permalink with more than one taxonomies
- How to limit custom post category
- ajax drop down change second drop down data
- Display taxonomy term slugs
- Automatically Populate Post Taxonomy Data Based on Post Author Meta Data?
- Get Posts by tag from a custom taxonomy
- Tax query array terms display out of order
- How to change taxonomy slug?
- Taxonomy to WordPress Permalinks of custom post type
- Create WordPress taxonomies based on theme settings
- 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
- Two taxonomies with the same slug