Forums › Forums › Search & Filter Pro › Problem with checkbox custom fields (no results show)
- This topic has 3 replies, 2 voices, and was last updated 10 years, 4 months ago by Ross.
-
Anonymous(Private) July 17, 2014 at 9:18 pm #2626
Hi,
In my site I have the “Advanced Custom Field” plugin, with different fields, three like radio and two like checkbox. Now, with your plugin, in the search-form, I connected the Post-meta fields with the custom fields. It seems that the search doesn’t find the meta-data of the checkbox fields (not results), but It works just with the meta-data of the radio custom fields. It’s because ACF inserts the checkbox fields data in an array? There is a solution?Ross Moderator(Private) July 17, 2014 at 10:12 pm #2631Hey Luca
I think this should be possible but it is not a very efficient search.
To search in arrays (serialized data) the plugin does a quick test first to “guess” whether the field is serialized or not, before deciding how to search it…
To be honest this was a bit experimental as not many people used it and may need some work.
Basically, the check works by selecting two random posts with the meta key, and checking if the values are serialized, if they are then it will perform a different search specifically for arrays.
Another possibility could be that you have a strange name for this field (with spaces, or mix of upper/lowercase – as a guess) so the search is simply failing on this field…
Please check and use simple field names as a test…
Let me know how you get on and I’ll try to figure out if there is something more I can do with the code..
Thanks
-
AuthorPosts