I've created a custom post type called 'properties' with custom meta boxes of 'price' and 'rooms'.
I have a custom loop-property-archive.php to display the properties.
What I would love to have is a method to sort the properties based on the meta data from those two meta boxes. Ideally I would have a drop-down called 'sort by', with the options of 'price asc.', 'price desc.', 'rooms asc.', and 'rooms desc.'. When the user selects an option the page is re-sorted.
I can currently query by custom taxonomies, which creates a URL like: mysite.com/?post_type=properties&area=high-ridge&university=birmingham. I need to be able to filter that page or any other combination of area and university. Therefore building individual templates with custom queries is out of the question.
I tested out appending meta_key=_price&orderby=meta_value to the URL but that doesn't work. Any ideas why?
I'm open to server or client side suggestions. Server may be better because if there is pagination involved I think that would be handled better. Obviously client side has the advantage of no page refreshes though.