How to have a default search filter value if none is selected by the user, e.g. on the initial page load?
You can use the Views API filter wpv_filter_query to modify the underlying query so that if no filter value has been specified then the default is set. The code becomes slightly more complex if you need to allow for the possibility that there are other filters available in the same search that may or may not have been set aside from the filter to which you wish to apply a default.
An example of such code that needs editing for your site appears below: https://toolset.com/forums/topic/set-view-default-value-if-views-is-not-set/#post-1314497
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.
|-||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)