Questions tagged [wp-query]

"wp-query" ambiguously refers to one of two things. 1) WP_Query is a class native to WordPress which allows users to query the posts database using a number of criteria. 2) $wp_query is the global variable that holds the main query object prepared by WordPress based on a given request.

Filter by
Sorted by
Tagged with
1
vote
1answer
59 views
+50

Order by two meta keys

I have this code which works fine: $args = array('post_type' => 'brands','meta_query' => array( array( 'key' => 'br_type', 'value' => 'Aviation')),'posts_per_page' => -1,'meta_key' =&...