Skip Navigation

[Resolved] Getting wpv-search-term

This support ticket is created 7 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Tagged: 

This topic contains 1 reply, has 1 voice.

Last updated by zoeS 7 years, 11 months ago.

Author
Posts
#457202

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

#457223

Oops no sorry, seems to be working now. Not even sure why. Think I swapped the single and double quotes around.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.