We're creating a new site that makes heavy use of Toolset Types and Blocks to manage our custom types. In this case we have a type called "Places to Study" and want to create an archive search that uses two filters - a set of checkboxes that pull from a "Place Features" taxonomy and a dropdown field that uses a "Locations" relationship.
This mostly works as expected except that users who choose more than one filter option (from the checkboxes or from the dropdown) get more results rather than fewer, because the query is using "and" logic instead of "or" logic. We'd like to change that behavior so that the more specific the search, the fewer results are returned.
But we've built an extensive site using blocks and having to rebuild our archive in the legacy editor and trying to recreate the block layout with shortcodes seems backward.
Is there any way to do this now using Toolset Blocks?
Our site is behind authentication, so we can't give you access, but you can see some screenshots below.
Hello. Thank you for contacting the Toolset support.
As I understand, you have post type archive with custom search where you added the "Place Features" taxonomy as frontend filter that is displayed as checkboxes and you want that when user select more than one checkboxes option those checkboxes option should have "And" clause instead of "OR" - is that correct?
Please clarify and then I will setup a sandbox site in order to share the solution with you.
Yes, pretty much. The default, unfiltered view should show all the Places to Study (currently 44 entries). When a user checks the box to choose a Feature, they see fewer results, as expected. But when they choose a second Feature option, they see more results when they should see even fewer results. Every result should be tagged with both selected features.
As I said in the original post, I can make this work in the legacy editor, so I'm hoping there's a way to set it correctly in the blocks editor settings.
The "And" or "OR" clause selection available with legacy view is for multiple custom fields. So for example if you have custom field A and B and you added custom fields A and B as frontend filter. You can set how both custom field should work with "And" or "Or" clause.
But as I understand you have checkboxes taxonomy or custom field where you want to have "AND" clause when user select multiple checkbox options. is this is true. (please clarify if its not true)
Can you please share problem URL and admin access details and let me see what workaround I can offer to you.
*** 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.
Never mind, it's not going to be possible for us to set up a testing site that you can access, or to get the details we need from your team. We've gone ahead and used the legacy editor but we hope that the Block editing interface becomes better supported that this isn't necessary in the future.