First, I've already checked the WP_Query Codex. I've already resigned myself to probably having to do a wpdb query, but here's my problem:
- If I query a single category ID, it returns all posts in that category and that category's children.
- If I query an array of category IDs, it returns all posts in those specific categories, but NOT their children.
Like this:
Top Level Category
Post 1
Post 2
->Sub Category
Post 1
Post 2
->Sub Category
Post 1
Post 2
-> Sub Sub Category
Post 1
Like so:
Top Level Category 1
Post 1
Post 2
Top Level Category 2
Post 1
Post 2
Top Level Category 3
Post 1
Post 2
I need a way to query the equivalent of the first example with several top-level categories and their children, but grouped separately in an array (e.g. array(group1, group2, group3))
Like so:
Top Level Category 1
Post 1
Post2
->Sub Category
Post 1
Post 2
Top Level Category 2
->Sub Category
Post 1
->Sub Category
Post 1
Top Level Category 3
Post 1
->Sub Category
Post 1
Any ideas?