Horje
Order By Multiple Meta Fields - Wordpress Solution
I currently have the following:
new WP_Query('post_type=listings&meta_key=Asking Price&orderby=meta_value_num&order=DESC')
I would like to order the values by the meta key "Status", then "Asking Price". How do I do both?

Solution - 1

http://www.mattvarone.com/wordpress/query-multiple-meta-values/


Solution - 2

what the possible value for "Asking Price" and for "Status" ?


Solution - 3

Hi, Please use this code: new WP_Query('post_type=listings&meta_key=Status&orderby=meta_value&order=DESC&meta_key=Asking Price&orderby=meta_value_num&order=DESC'). You can change value "DESC" for testing. Tnks for reading Phucvh





Wordpress

Related
Updating class-snoopy.php widget to http.php - Wordpress Solution Updating class-snoopy.php widget to http.php - Wordpress Solution
Need Widget to display new users - Wordpress Solution Need Widget to display new users - Wordpress Solution
Further customizing Flickr integration on Autofocus+ Pro Theme? - Wordpress Solution Further customizing Flickr integration on Autofocus+ Pro Theme? - Wordpress Solution
Subscribe to Categories - Wordpress Solution Subscribe to Categories - Wordpress Solution
Load Javascript & CSS Only on Add New Post & Add New Page Screen? - Wordpress Solution Load Javascript & CSS Only on Add New Post & Add New Page Screen? - Wordpress Solution

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7