Home › Forums › Front-end Issues › Assistance with ACF query › Reply To: Assistance with ACF query
Hi @Martijnnn
I think the only way to do this is to first query all events for the year. Then loop though all the events and load in the selected artists that played.
You can then use this data to increase a counter for each artist.
Then at the end of the loop, you will be left with counters for each artist which you can then find which one is the biggest and display that artists information.
If performance is a concern, I would swap the relationship field type, for a plugin called ‘posts 2 posts’
Thanks
E
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.