Skip Navigation

[Resolved] Make View Search Field Optional

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 17 replies, has 3 voices.

Last updated by Waqar 1 year ago.

Assisted by: Waqar.

Author
Posts
#2676387

I've replaced the OR operators ( || ) in that line, with the AND operators ( && ):


if( empty($_GET['wpv-relationship-filter-make']) &&  empty($_GET['wpv-relationship-filter-model']) && empty($_GET['wpv-relationship-filter']) ) {

Earlier, the results would be withheld, until all three relationship field had some options selected. Now, they'll only be withheld, until any one of the relationship field has some value selected.

#2676419

Thank you for the reply. That looks good, but it's still not letting me see all of the tuners when no vehicle is selected. I still have to choose a make to get results. What I would like to see is 2 fold:

I want to be able to navigate to hidden link and click the submit button to get all of the results.
I also would like to be able to load the page and select only a category (and no make) and get results.

Is this possible?

#2676475

That should be fairly simpler and I've changed that same line in the code to:


if( (!isset($_GET['wpv_filter_submit'])) || (empty($_GET['wpv_filter_submit'])) ) {

This line now only checks whether the submit button of the search form has been clicked or not.

#2676512

And now it works perfect again. Thank you for your help!