I have this query…

<?php 

    $press = new WP_Query(array(
        'posts_per_page' => -1,
        'post_type'     => 'individual',
        'post_status'   => 'private' 
    ));

    if ($press->have_posts()) : while ($press->have_posts()) : $press->the_post();

?>

But my custom post-types are using custom taxonomy with a numeric term value.

My question is there anyway in ordering this query by the term value?

The taxonomy is called ‘individual-group’

Any help would be hugely appreciated thanks.

Josh

3 Answers
3

No, there is no way to do this with default WP Core. @heathenJesus talks about meta data not taxonomies. See http://scribu.net/wordpress/sortable-taxonomy-columns.html for a proper solution.

And a more thorough explanation of why this is not something built into Core: Using wp_query is it possible to orderby taxonomy?

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *