Home Forums General Issues ACF relationship field group by taxonomy Reply To: ACF relationship field group by taxonomy

  • In your relationship field you set it to return an array of post ID values. Then in your template you do 2 queries using the value for “post__in” being the value returned by the relationship field and add a tax_query to each of these queries so that you only get the posts in each term. Then you loop over the posts returned for each of these queries.

    Alternately, you create two separate relationship fields and only select the correct posts for each section to be displayed. This works out the same as the first options but you don’t need to do the queries yourself.