I'm using the [[LINK href="http://wordpress.org/extend/plugins/wp-custom-fields-search/"]] custom fields search plugin[[/LINK]] to return numerical results. (like you would see on a realtors site). What I can't figure out how to do is display these results from Highest price to lowest price on the search page.
On the other archive pages I have used this to get the correct order.
ORDER BY $wpdb->postmeta.meta_value+0 DESC
But when I use this in the search page, it resets the query.
The Plugin settings are.
3. The custom field is called meta_search
Julio Potier answers:
I think you search page (in your theme) should be modified.
before the "while have_posts()" try to add this :
query_posts($query_string . '&meta_key=meta_search&orderby=meta_value_num&order=DESC');
This will modify the query to sort posts by meta_field, numerically.
See you !
That did it.. Thanks!