Forums › Forums › Search & Filter Pro › Simple search boxes for ACF fields
Tagged: acf
- This topic has 7 replies, 2 voices, and was last updated 6 years, 5 months ago by Trevor.
-
Anonymous(Private) July 27, 2018 at 2:17 am #183645
I wanted to create a search form that has two search boxes.
Is it possible to have a search box only search a specific ACF field?
Eg
search box 1 to search surname (ACF field) only
search box 2 to search age (ACF field) only
SubmitThe result would show if a surname search of Smith with age search of 45 matched.
Anonymous(Private) July 27, 2018 at 6:12 am #183648So I have tried setting up a Post Meta field then used the Choice setting with a Multi-select option. What I need to do is hide the multi-select option and type into that field, is that possible?
I used CSS to hide the dropdown options but when typing into the filed on the live form it would hide what I typed.
Any suggestions at this stage would be helpful.
Trevor(Private) July 27, 2018 at 7:38 am #183662The issue is that our plugin does not perform the text field search. That is handled by WordPress, which itself only searches Post Title, Content and Excerpt. That WordPress search behavior can be modified using plugins, such as Relevanssi (if using Relevanssi, we support that, and some other plugins also seem to work OK with Search & Filter, but not all do). Such plugins would allow the searching of custom fields.
WordPress then passes a list of matching Post IDs back to Search & Filter, and then, if used, Search & Filter uses any other field choices to further filter the results.
-
AuthorPosts