This thread is resolved. Here is a description of the problem and solution.
Problem:
The issue here is that the user wanted to include ACF fields in the Toolset Views search however when they performed the search the view doesn't return any values.
Solution:
In order to perform a partial text search on any custom field with our Views/Blocks plugin you will need to have the relevanssi plugin installed.
It is only with this plugin installed that you are able to use the text search option to search through custom fields.
This support ticket is created 3 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
I would like to add ACF custom fields to parametric search, but it's not working.
I have a Custom Post Type called 'Resources' and it contains 2 ACF custom fields (both text fields). One is for the author's name and one is for the year. (screenshot: hidden link)
I have created 2 Resources posts for testing (Example screenshot : hidden link).
I have also created a View. I know the default 'Text search' is for searching keywords in post titles and post content, but for now I am not using it. Instead, I have added a ACF custom field (author's name) as a 'text field' filter under the 'Search and Pagination' section (screenshot: hidden link).
When I went to check the functionality on this page (hidden link), and typed in a name (either John or Jane), it's not working. It's displaying 'No items found'.
However, when I switched the ACF custom field (author's name) to a different field type such as a select dropdown or checkboxes, it works. Why doesn't a text field work for ACF custom fields in the parametric search. Am I missing something?
I tested this on my end and it works without any issues at all.
What I did notice is that the search field text must match exactly what is in the custom field or it won't work. Perhaps it may be better to use Relevanssi and add the general search to the view as this will allow you to search through custom fields as well and as long as the text partially matches it will work.
That's strange. Are my Toolset View settings correct?
Under 'Query Filter' section, I have:
Select items with field: Filter based on the frontend search filter by resource_author_name. (screenshot: hidden link)
Under 'Search and Pagination' section, I have this (screenshot hidden link)
As well, the settings for the custom textbox field (filter) is this (screenshot: hidden link)
Under 'Loop Editor ' section, I have this (screenshot: hidden link)
Yes, I get your point now. The search field text must match exactly what is in the custom field. If the custom field has the value 'John Doe', users will have to input 'John Doe' and not just partial of the name in the search field.