I am trying to create a sort of hacky front end orderby effect (I know it's not a feature of Views yet) by creating a list of links under the main search filters. These will each start by reconstructing the current search parameters, and then will add the orderby parameter at the end.
Here is a sample URL with parameters (line breaks added for legibility):
/your-search-results/?
property-price_min[]=200000&
property-price_max[]=1000000&
wpv_aux_current_post_id=2864&
wpv_sort_orderby=post_date&
wpv_sort_order=desc&wpv_view_count=594&
wpv-property-type=chateau&
sale-or-rent=sale
And here is what I am trying to do with it:
<a href='/your-search-results/?
wpv-property-type=[wpv-search-term param="wpv-property-type"]&
property-price_min[]=[wpv-search-term param="property-price_min"]&
property-price_max[]=[wpv-search-term param="property-price_max"]&
sale-or-rent=[wpv-search-term param="wpv-sale-or-rent"]&
wpv_sort_orderby=field-wpcf-property-price&
wpv_sort_order=desc'>
Order by Price (high to low)</a>
But as yet none of the parameters are being filled. Can you tell me what I'm doing wrong please, or if actually I have completely misunderstood wpv-search-term? Thank you
Oops no sorry, seems to be working now. Not even sure why. Think I swapped the single and double quotes around.