Home › Forums › General Issues › Can\'t Filter wp-query by a relationship ACF field › Reply To: Can\'t Filter wp-query by a relationship ACF field
You can’t do the query that you’re trying to do. A relationship field holds an array of post IDs and is stored as serialized data in the DB.
https://www.advancedcustomfields.com/resources/query-posts-custom-fields/
https://www.advancedcustomfields.com/resources/querying-relationship-fields/
You will not be able to order your posts by this field.
What you need to do is create a bidirectional relationship so that you can get the testimonials that need to be shown when you are showing the program rather than trying to query the testimonials that have the program.
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.