WP Query with Tax Query – OrderBy don't work
-
I’m trying to keep my posts sorted by date in a wp_query with tax_query, but unfortunately the posts are not showing organized by date, this is my query:
$args = array( 'post_type' => 'myCPT', 'posts_per_page' => '-1', 'tax_query' => array( array( 'taxonomy' => 'category-page', 'field' => 'slug', 'terms' => 'MyTerm', ), ), 'orderby' => 'date', 'order' => 'ASC', );
Any idea?
- The topic ‘WP Query with Tax Query – OrderBy don't work’ is closed to new replies.