Skip Navigation

[Waiting for user feedback] Location and Dept Filters not working together

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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 1 reply, has 1 voice.

Last updated by Minesh 1 week ago.

Assisted by: Minesh.

Author
Posts
#2810689

I’m using a View to filter job listings by two taxonomies: Locations and Departments. The problem occurs when I select a location (e.g., Amarillo) and leave the department filter as “Any.” In this case, the View returns no results, even though there are jobs available in that location.

From my investigation, it seems that when “Any” is selected in the department dropdown, the URL still includes an empty department parameter like this: wpv-department[]=. Since my View’s taxonomy relationship is set to AND, Toolset is filtering for location=Amarillo AND department="", which doesn’t match anything.

If I remove the empty department param (wpv-department[]=) manually from the URL, the location filter works as expected and returns results.

I’ve tried using JavaScript to remove the empty department param before form submission, but it looks like Toolset’s AJAX filter grabs the param before my script runs, so it doesn’t work.

Changing the taxonomy relationship to OR doesn’t help either because I want location AND department when a department is actually selected.

What I need is a way to tell Toolset to ignore the empty department filter (wpv-department[]=) so that location-only filtering works when no department is selected. Is there a built-in setting or a recommended hook to handle this?

Here’s an example URL that shows the issue:hidden link

#2810746

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share admin access details and let me check what's going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.