[wp-hackers] Querying posts inside hierarchical custom taxonomy

scribu scribu at gmail.com
Mon Sep 21 11:32:25 UTC 2009


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
> Europe
>  France
>  Germany
> Asia
>  Vietnam
>
> 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).
>
> Malaiac
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>



-- 
http://scribu.net


More information about the wp-hackers mailing list