Home › Forums › Front-end Issues › WP_Query with user array field › Reply To: WP_Query with user array field
Hi @Exelmans Graphics
Thanks for the info.
because your field is a multi-select, the data will be saved into the DB as a serialized array of user ID’s.
The WP_Query does not contain any feature to search for serialized data, this is why we need to use a LIKE hack.
This is all documented on the reverse relationship documentation here:
http://www.advancedcustomfields.com/resources/field-types/relationship/
Note: The relationship field saves it’s data as a serialized array of post_ids. It is exactly the same as what you have, so the technique will work the same too
Thanks
E
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.