Forums › Forums › Search & Filter Pro › Filter only gets applied after second time it's used
- This topic has 20 replies, 3 voices, and was last updated 5 years, 9 months ago by
Anonymous.
-
Anonymous(Private) May 21, 2019 at 11:01 am #211780
Hi,
we are using the plugin in two ways – one search form that gets applied to an archive, and one that uses a shortcode.
The first one, with the archive, works well.
The one with the shortcode is applied on a Page we made. The form uses a custom template we made in search-filter-pro/templates/.
This second one only applies the filters after the second time the filters are selected. We don’t really use a custom grid (to my knowledge), however the theme might be doing something in the background. We are using Enfold Child.
Another possible culprit is the template we made itself. Maybe it has errors in it (although we used the default template as the base).
Let me know what additional info you might need to help us solve this issue.
Anonymous(Private) May 22, 2019 at 1:45 pm #212001Update:
Error is fixed. The search-results.php file we talked about was set in “Display results method”/”as an archive” option. After removing it, saving, changing to shortcode again, the form seems to not throw the error anymore.
However, it still doesn’t display results the first time it is applied.
If AJAX is enabled, the filter has to be applied twice, even with the default template.
If AJAX is disabled, it loads the archive of the selected filter, e.g. “/difficulties/advanced” if the advanced filter is applied. This is a problem, because the archive page loads the results with a different form, not the template one. So the initial page uses the template, but the results page does not.
Anonymous(Private) May 23, 2019 at 10:17 am #212157I tried disabling all of the plugins, which caused the filter form to not load any of the custom taxonomies.
I then enabled Custom Post Type UI, the plugin we use for custom posts, and it loaded the form. However, the same JS error from my previous post (#211997) happens.
-
AuthorPosts