Forums › Forums › Search & Filter Pro › Search Not Filtering
- This topic has 7 replies, 2 voices, and was last updated 10 years, 4 months ago by Ross.
-
Anonymous(Private) July 16, 2014 at 12:06 am #2543
Hi guys,
Great plug-in! I tried to search the forum for other tickets like this, but I couldn’t see a lot of the results because the messages were marked as private.
I have a form setup to filter using AJAX (I’ve tried without it too), but when I use the search field (I’ve also tried a dropdown with taxonomies) nothing is actually filtered.
I’m using a custom post type, which is correctly selected in the settings. I’ve also set the unchecked the custom template (for simplicity), and set the content selector to the right location.
I’m pretty stumped about what I’m doing wrong. Can you help?
Ross Moderator(Private) July 16, 2014 at 1:48 pm #2559Hey Andrew
The first thing to check is, does the search work without ajax? This must always work how you want first, then enable ajax and see if it is an ajax specific issue ๐
Also, can you send me a preview link?
Thanks
Anonymous(Private) July 16, 2014 at 3:42 pm #2567You can see the test site here: http://asylum-dev.rootid.in/join-us/spread-word/
It does appear to work without the AJAX. I’m being taken to the search results template.
For instance: http://asylum-dev.rootid.in/?s=descriptive&sfid=2m
Ross Moderator(Private) July 17, 2014 at 9:42 pm #2627Hey Andrew
Just taking a quick look and some settings you should try:
Tick
use custom template
and make suresearch.php
is entered as the filenameEnter a slug for the search form such as
search-results
and then try to access your search page by the slug, for example with the slug above it would be:http://asylum-dev.rootid.in/search-results
So go directly to this URL and you will see your search results template.
Now, what you want to do it get the search form on to this template, so I would suggest adding a widget in for example, or editing
search.php
and placing the shortcode somewhere near the top and outside of where your results are displayed.Once you’ve got all this setup you should notice it is working much better, then it will be simple to enable Ajax, just let me know when this is ready.
Thanks
Anonymous(Private) July 18, 2014 at 11:51 pm #2664This is now getting results on the search page, but I’m still not able to get the AJAX working correctly.
Ross Moderator(Private) July 21, 2014 at 1:45 pm #2709Hey Andrew the problem here is that both pages/templates do not have the same structure or container with a matching ID.
For the first link- you could use
.col-left
as you AJAX selector – and it should work fine…However the spread the word page does not have such a selector.
Basically both page need to have the same container existing for AJAX to work, so either add
.col-left
to your spread the word page, or you could use#main-listing
from the spread the word page and add it to your search results page…Let me know if you need further explanation ๐
-
AuthorPosts