Skip Navigation

[Resolved] Parametric search taxonomy checkbox default selection

This support ticket is created 6 years, 1 month 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 6 years, 1 month ago.

Assisted by: Nigel.

Author
Posts
#1197443

I have a set of parametric search with taxonomy checkboxes and would like to check one of the boxes by default based on the page where the view is loaded.

i.e I have multiple resort types (luxury, all inclusive, etc.) stored as a taxonomy. In a view on the 'luxury' page, i would like the 'luxury' taxonomy filter checked by default so that only those resorts show initially but the other resort types are options as well.

#1197660

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Views doesn't have an option to choose a default value for front-end filters (you might want to submit a request for that at https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/).

There is a workaround of sorts.

If on that page you apply the taxonomy filter you will notice that the page updates with URL parameters for the filters, so it might look something like wpv-resort-type=luxury.

If you can add that URL parameter to the links to such pages (e.g. if people navigate to the page from a menu link) then that would apply the filter on the initial page load, and it could still then be modified.