How do I get all of a single taxonomies terms that have one or more particular sibling terms?
For example, let's say I have the following taxonomies. Terms are listed underneath the taxonomies, and the parenthesis indicates have many posts the terms are used on.
- sixteen (used on 3 posts)
- twenty-seven (used on 0 posts)
- thirty-four (used on 12 posts)
- Blue (used on 5 posts)
- Brown (used on 10 posts)
- Green (used on 0 posts)
My desire is to get a list of all of the terms within
- have posts
- are used alongside
thirty-fouron one or more posts
Of course, I know that get_terms() has a
hide_empty argument, but that only accomplishes half of what I want.
UPDATE: A comment below links to a function that allows you to find terms based on sibling terms of a single taxonomy...but I'd like to find terms based on sibling terms of multiple taxonomies.
In plain english, I'd basically like to:
Select all terms from
taxonomy A that are used on a post with both
Term 1 from Taxonomy B and
Term 2 from Taxonomy C.