Home › Forums › General Issues › List of Users – Filtered by an ACF field › Reply To: List of Users – Filtered by an ACF field
That depends on what the other plugin is expecting to see in the custom field. An ACF relationship field stores an array of Post IDs. In the DB this is stored as serialized data.
When you do a reverse relationship query, which is what you need to do in PHP to get all the users associated with a post you need to do a LIKE
query on the value "{$post_id}"
(note the “s). So the plugin needs to be able to look for values that are “LIKE” the value you are looking for rather than exactly equal to.
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.