Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Using Multiple Search Terms
This topic contains 2 replies, has 2 voices, and was last updated by dean1111 8 years, 9 months ago.
- AuthorPosts
- December 10, 2014 at 8:06 pm #3215
Hi,
I just bought Ajax Search Pro and I have a question. Is there a way to force it to only find posts that meet ALL the search terms? Right now, if I input “Jeff Brown, 2014” it brings up things that have 2014 in the categories or custom fields but that DON’T have Jeff Brown in them. Users need to be able to put in multiple search terms and find only posts that have all the search terms, not just some of them. Is this possible?
Thank you,
J. DeanDecember 11, 2014 at 7:48 pm #3218Hi!
Sorry about the late answer, my host had some server issues today.
So, by default this is possible only on title, content and excerpt fields only. The reason is the speed. However I put together a modified version of the core search class to support this feature for terms and custom fields as well.
You can change the search logic on the General Options -> Behavior tab: https://i.imgur.com/Q9SGAGa.png
You should try out all of the variations, one of them should fit your needs.
As I mentioned before it won’t affect the term and custom field search, unless you apply a modification. Open up the wp-content/plugins/ajax-search-pro/includes/search_content.class.php file and replace it’s contents with this: http://pastebin.com/raw.php?i=GBAMFNYc
It should work based on my initial tests on my local test server.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
December 11, 2014 at 10:49 pm #3219Thank you so much for the modification. I appreciate your time. I’m not sure where I’m going wrong but I am testing with two search terms that I know should bring up at least one result and I’m getting nothing at all. I’ve tried many different variations of settings and still no luck. I suppose this plugin just isn’t right for my needs. Is there any possibility of getting a refund?
- AuthorPosts
You must be logged in to reply to this topic.