Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Include Custom Field in Search
This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko 4 years, 2 months ago.
- AuthorPosts
- January 18, 2019 at 7:12 pm #20851
Note this is our development site. The license for Ajax Search Pro is on the live site stewartmckelvey.com. I tested this under the licensed version, too and it’s not working.
We have a search filter on this page (Find a Professional):
https://peiwebsolutions.thedev.ca/stewartmckelvey2/our-team/The open search field (Name) is set to search a Custom Post Type Title and I’ve added a custom field ‘_nickname’ to be included in that field search. Used these instructions: https://documentation.ajaxsearchpro.com/general-settings/search-in-custom-fields
However, the nickname field does not appear to be picking up.
I didn’t disable other plugins since the search works great otherwise. That doesn’t appear to be a likely issue. No error log messages are generated.
If you search for ‘charles’ or ‘harold’ you will get results. These are in the post titles. However, if you search for ‘chuck’ or ‘harry’, you get no results. These are in the nickname custom field.
January 21, 2019 at 12:27 pm #20861Hi,
Thank you very much for all the details, I have found the problem. The issue was, that the custom field is not ‘_nickname’ but simply ‘nickname’: https://i.imgur.com/l4PAq8Z.png
Best,
ACF usually creates two fields, one prefixed with ‘_’ for reference only.
I have selected that field as well, and now if I try to search for a nickname, it seems to be returning the expected results now.
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
January 21, 2019 at 1:55 pm #20862Well that was simple. I should have thought of that. Thanks so much. ASP is a great plugin BTW. I really like how customizable it is.
Beth
January 21, 2019 at 4:12 pm #20871You cannot access this content. Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.