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?
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.