Support

Account

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.