Display Custom Posts by Term in Hierarchy
-
I thought this was a simple concept but I’ve spent nearly 5 hours scouring the Interwebs and I can’t find what I need.
I have a custom post type called “gifts” and a taxonomy called “relationship”. The taxonomy has a hierarchy structure.
I want to spit out a navigation for this taxonomy that uses the accordion jQuery effect. I can achieve this by hard coding the links in so they jQuery is working properly.
Since I have hundreds of custom posts (and expect it to be into the thousands, soon) I’d like to make the menu populate automatically. What I need it to do is display all of my taxonomy terms in hierarchical order and list the posts associated with each term underneath it.
It seems I can get the terms with wp_list_categories, but not the posts. I’ve tried about a dozen or more other pieces of code, but they all return a flat list of terms in alphabetical order. Seems I can’t marry the two options.
Is this type of a query even possible?
- The topic ‘Display Custom Posts by Term in Hierarchy’ is closed to new replies.