Skip Navigation

[Resolved] Multiple filter not working properly

This support ticket is created 3 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.

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 4 replies, has 2 voices.

Last updated by darcyR 3 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#2308253

I am trying to: Make the multiple filters work using AND relationship

Link to a page where the issue can be seen: hidden link

I expected to see: Properly filtering the results based on what’s set on the filters

Instead, I got: Incorrect results.
You can try with these fields:
condition: new
fuel type: diesel

and will just show items that pre-owned even if it’s specified to be new and shows items that are gas even it’s set to be diesel.

#2308257

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

This seems to be a known issue to us and we publish the following errata page:
- https://toolset.com/errata/not-possible-to-compare-multiple-custom-field-filters-with-or-instead-of-and/

Please adjust the filter code with your required AND or OR clause. Does that helps?

#2308347

I tried adding this as a snippet under the Custom Code tab but encountered an error “ There was an error when updating snippets.”

#2308361

Minesh
Supporter

Languages: English (English )

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

That is strange, you must have done some mistake while applying the code.

Can you please share admin access details as well as share where you added the code.

In addition to that, please clarify and confirm that you want AND relationship with all the custom field filters added - right?

*** 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.

#2308439

I realized that the snippet we had there was for making it show OR. I’ve deactivated that and now it’s working okay.
Apologies about this.