[wp-hackers] Querying posts inside hierarchical custom taxonomy
jer at simianuprising.com
Mon Sep 21 23:27:23 UTC 2009
I'm also unclear about what you're asking.
Assuming you want to get all posts in a given term AND its children,
have you checked that it doesn't already do so when you fetch the
term? For categories it already does so, though maybe not for
hierarchical custom taxonomies. The categories part in in
1789 $q['category__in'] = array_merge($q['category__in'],
Maybe that's helpful,
Code and Design | globalvoicesonline.org
On Mon, Sep 21, 2009 at 7:32 AM, scribu <scribu at gmail.com> wrote:
> To be clear:
> Do you want to query_posts(...) or do you want to get_terms(...) ?
> On Mon, Sep 21, 2009 at 11:35 AM, Malaiac <malaiac at gmail.com> wrote:
>> Custom taxonomy for posts is "places".
>> Hierarchy is like
>> I can query posts from "France" or "Vietnam".
>> How should I query posts to get all those from Europe or Asia ?
>> There is no children term query inside wp_query (query.php, around
>> line 1947, there is : $terms = get_terms($q['taxonomy'],
>> array('slug'=>$q['term'])); , with no way to ask for children terms).
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers