Skip Navigation

[Resolved] Toolset view – Add ACF custom fields to parametric search

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 2 years, 9 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 6 replies, has 2 voices.

Last updated by Paul Marconi 2 years, 9 months ago.

Assisted by: Shane.

Author
Posts
#2113421

Hi there,

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?

Thank you!

#2113665

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

In order to get this accurately, you are referring to a textbox field and not a WYSIWYG field correct?

As I know WYSIWYG field might have special formatting that could affect this.

I would like to replicate this issue on my end but I need to know the exact field type.

Thanks,
Shane

#2114275

Hi Shane,

Yes, it's a textbox field, not a WYSIWYG field (screenshot: hidden link).
(hidden link)

Thanks!

#2114369

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Paul,

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.

Thanks,
Shane

#2114445

Thanks Shane for investigating this!

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)

Are those correct?

Thank you!

#2114471

Hi Shane,

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.

My issue is resolved now.

Thanks!

#2114473

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.