Hi, I built a taxonomy archive page with Blocks. I've activated the Search option with "AJAX refresh when changing any filter" and "Show only filter options that would produce results".
The problem is that the last setting is not working fine. The filters are displaying all the options, including options that would not produce results.
This is an example on the front page:
/bizkaia/
This is the Archive:
/wp-admin/post.php?post=35&action=edit
In the archive you will find the Archive loop with the search bar and a Google Map that displays markers coming from another view loop, not from the Archive loop.
cheers
Hello, there were some problems with the "show only filter options that would produce results" custom search feature in Blocks 1.5.2, but Blocks 1.5.3 included updates that should have resolved those problems - https://toolset.com/errata/view-setting-show-only-filter-options-that-would-produce-results-not-working-correctly/. It is possible that some edge cases or scenarios were not completely fixed in the latest update. It could also be the result of a conflict with another plugin, or a conflict with custom code in your theme or code snippets. I can see that your site uses a 3rd-party plugin to remove the taxonomy base slug from archive URLs. I can see you also have similar custom post types and taxonomies called "Provincia" or "Provincias". Since the problem occurs in a Provincias taxonomy archive, I wonder if either of those circumstances is causing or contributing to the issue with filter options. As a test, can you try these troubleshooting steps first to rule out conflicts?
- Temporarily activate the parent Astra theme
- Temporarily deactivate all custom code snippets in Toolset > Settings > Custom Code
- Temporarily deactivate all plugins except Types and Blocks
- Test the archive again, and note that the URL of the archive may have changed since disabled the plugin to remove the taxonomy base slug from the archive URLs
- If the problem is resolved, reactivate the theme, custom code snippets, and other plugins one-by-one until the problem returns
- If the problem is not resolved, I may need to make a copy of the site to run some more tests Please let me know if that is the case, and I can make a site clone.
Please let me know the results of his test and if I can make a site clone.
Hi Christian, I've followed the troubleshooting steps: I've activated default theme, I've deactivated all the plugins but Toolset, I've deactivated custom code, I've re-saved permalinks and I still got the problem.
You can make the local clone.
cheers
Thanks, I created a site clone and installed it locally. If I delete the Content Template above the custom search filters, the problem seems to be resolved. The issue could be related to a conflict with one of the other Views included in the Cabacera - Archive Content Template. I am still investigating and will give you another update shortly.
Okay I was able to solve this in my local copy by editing this View, which is included in the Cabacera - Archive template:
/wp-admin/admin.php?page=views-editor&view_id=2550
I added the filters shortcode back to the Output Editor panel:
It seems that without the filters section in this View, the system has trouble implementing the feature that only shows the filter options that produce results in the WP Archive search filters. There are no front-end filters included in this View anyway, and the option to disable the wrapping div is checked, so adding the filter meta shortcode has no impact on the front-end of the site as far as I can tell, other than solving the problem in the WP Archive filter options.
I made this change in the live site and it seems to be showing the appropriate filter options now, can you confirm?
Yes!! My issue is resolved now. Thank you!