Home › Forums › Front-end Issues › Field Type "User", only show the posts that the "User" is selected › Reply To: Field Type "User", only show the posts that the "User" is selected
Hi @sbrenner7
The fact that your user field is a multi-select is a large factor which will effect the code.
If the field was a sinlgle select, you could perform a simple meta_name / meta_query lookup, but because it is now saved as a serialized array, you will need to allow for this in the meta_query param.
Please look over example 3 on this page:
http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
It should how you can find posts based on a value, which has been selected by a custom field which saves it’s data as an array.
Perhaps you can post your code 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.