Hot answers tagged order
As Milo said : $query->set('meta_key', 'wpcf-object-sold-status' ); $query->set('orderby', array('meta_value' => 'ASC', 'date' => 'DESC')); // $query->set('order', 'ASC DESC' ); // not needed Relevant link: https://make.wordpress.org/core/2014/08/29/a-more-powerful-order-by-in-wordpress-4-0/
On the contrary to what is suggested by the accepted answer, you should never use query_posts Note: This function isn't meant to be used by plugins or themes. As explained later, there are better, more performant options to alter the main query. query_posts() is overly simplistic and problematic way to modify main query of a page by replacing it with new ...
Only top voted, non community-wiki answers of a minimum length are eligible