Forums › Forums › Search & Filter Pro › search & Filter pro – ajax not working
- This topic has 14 replies, 2 voices, and was last updated 10 years, 1 month ago by
Ross.
-
Ross Moderator(Private) January 26, 2015 at 2:59 pm #10943
Hey Pius I’ll take a look today/tonight.
Thanks
Ross Moderator(Private) February 4, 2015 at 12:15 am #11408Hey Pius
So I had a look, there are a few things that need fixing
1) your results container was missing the dot on the class name – I updated this to
.projects_holder_outer
and at least now it knows where to find / load the results.2) your search results template is not configured correctly. The absolute best thing to do in this situation is actually disable ajax (which I have done) – get your results appearing correctly upon form submission, then reintegrate ajax.
———-
So I’ll try to explain how it works and what you should be looking to do.
When you are on your homepage, you are on your themes homepage with all the code and layout as such.
The search form being present there does not affect anything. When you submit a search form, you get taken to a “results” page – this is a custom url that will try to display the results based on your search settings.
Now we must make this page match the layout of the homepage for ajax to work smoothly – this means you must use a page layout/template from your theme.
Under “display results” tab you will notice that the tickbox “use custom template” is ticked and there is now a filename of the template we will use to display the search results.
I’ve done all this but there are still problems – these are really to do with your theme not conforming to WordPress standards.
The main issue is that your theme is not using standard WP templates, which use the WordPress template hierarchy – to fix this normally requires creating a new template (from an existing one) and making some modifications – but it really does depend on your theme – ask them how to create a page template that uses the The Loop or make modifications yourself as per these posts (there are some linked):
https://support.searchandfilter.com/forums/topic/all-results-returned-on-filters/#post-11389
Let me know that makes sense – sorry you have to jump through so many hoops but its that your theme seems to be non standard and its not really something I usually would provide support for.
There is one other issue I’ve noticed – but this is really a reminder to myself (as the above must be fixed first) – is that you are using the same taxonomy twice – for different sets of dropdowns – you must use a separate taxonomy for each field in the Search Form UI.. (it also makes more sense semantically)!
Thanks
Ross Moderator(Private) March 12, 2015 at 2:02 pm #13307Hey Pius
Glad we’re nearly there at last!
The problem you mention I already described above:
There is one other issue I’ve noticed – but this is really a reminder to myself (as the above must be fixed first) – is that you are using the same taxonomy twice – for different sets of dropdowns – you must use a separate taxonomy for each field in the Search Form UI.. (it also makes more sense semantically)!
Please see this link from a user which had the same problem:
https://support.searchandfilter.com/forums/topic/and-filtering-not-working/#post-9913
Essentially, you cannot use “category” field more than once – for each field you must create a custom taxonomy – custom taxonomies work just the same as categories – so no worries there – please see link above for instructions.
Thanks
-
AuthorPosts