Skip Navigation

[Resolved] how to modify search within a taxonomy to OR instead of AND

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

Last updated by Minesh 6 months ago.

Assisted by: Minesh.

Author
Posts
#2698967

I have not been able to create a backup/duplicate with Duplicator, I get an internal server error.
I have been able to do it with a different plugin, called WP Staging. Here's a link to the website content + ddbb: hidden link

I have also created a staging site. Here's the url: hidden link
and here's a 7 days access link:hidden link

#2699069

Hi Minesh, thank you again for your support.

I have not been able to create a backup/duplicate with Duplicator, since I get an internal server error.
I have been able to do it with a different plugin, called WP Staging. I have added a link in the private answer, as well as a direct link to enter the staging site.

Regards,
Luca

#2699530
Screenshot 2024-05-27 at 07.56.05.png
Screenshot 2024-05-27 at 07.55.53.png

Hi,
did you manage to have a look at it?

I have created a clone of the filter page in the staging site. The configuration is exactly the same (see screenshot) but in this case the third taxonomy works correctly, whereas in the original page it doesn't. With the exact same configuration. I don't understand why..

#2699608

Minesh
Supporter

Languages: English (English )

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

I checked the query filter and I just disabled the plugin "Speed Optimizer".

I checked the query filter and I see it does offer the "AND" clause now between all taxonomies and its associated terms for all three taxonomies.

Can you please check:
- hidden link

Do you still see the issue, if yes can you please share test case by selecting multiple taxonomy terms from all three taxonomies in what case I see the result and how many post and in what case there should be no results.

#2699621

Hi Minesh, thank you for your support.

I don't see any changes, the issue is still there. The AND clause works fine as it did previously, the issue that is still there lies within the third taxonomy, Traceability. When selecting both "FDA and GMP compliance" and "ISO 13485 Compliance", the result should be 0, since there are no product that share the two values. There are 4 products for "FDA" and 10 for "ISO". Currently, the results is 14 products instead (4+10).

When selecting both values, the filter add them both, instead of filtering. It is currently working with OR instead of AND, I think.

#2699673

Minesh
Supporter

Languages: English (English )

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

Actually - its really weird.

I can see the expected results as you can see with the following video I recorded:

Please check the following video: hidden link

Maybe you should try to check with new browser or check about cache?

#2699751
stagesite.png
realsite.png

Yes, like I said here, I can see correctly the results in the staging site, but not on the main site, even though the configuration is exactly the same (see screenshots attached)...

There is no reason why the behaviour is different with the same configuration right? It's weird

#2699762

Minesh
Supporter

Languages: English (English )

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

That's really strange. I can work on live site but due to complex filter mechanism using Javascript you added I fear that could may lost or the view you are using is corrupted somehow or any other thing.

Can you try to add those taxonomy filters on your live site one by one and make sure you select and relationship and if you dont see it working still try to remove the custom search filter and try to add only query filter and see if you can otherwise I will try to create brand new view on your live site with test page and will see if that helps and you can later adjust the view's output and styling.

I hope this makes sense - if yes:

Can you give a try and then send me admin access details for live site where I will create a test page or you can offer me test page where I will create a brand new view and check if we able to fix that.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) 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.

#2699937

Hi Minesh, thank you for your continuous support.

I did as you suggested and managed to configure the query as needed, but still the query filter changed on its own. Always.

The only way I found to make it work like I need is by adding a 4 filter, not needed, and then hide it. This way, the query filter automatically changes once again, but the filters I need are not change - only the last one is always changed.

See here: hidden link

This way, it works. It's really weird, but at lest it's working now.