Support

Account

Home Forums Add-ons Repeater Field Repeater Plugin – Group By Help Reply To: Repeater Plugin – Group By Help

  • I think the query i am after is a little more complicated. I am trying to do a GROUP BY on a repeater field subfield value.

    My data is setup like this:

    custom post type called “companies”.
    In the post type i have a repeater field called “Locations”.
    In the locations repeater field I have address, city, state, zipcode — all of the address information.

    I am building a map so I want to show all results grouped by state. Ideally, I’d be able to show what all states are in my repeater field and show the count of how companies are in that location.

    I’m finding it a bit tricky to group by the repeater state sub_field that I’ve created. Any ideas how to do that?