Hmm, I guess there are two solutions to this. The first would be to create a nested repeater, i. e. one repeater for the event dates, and inside that, another repeater for event title and description. And then you loop over the dates, and in each iteration, you loop over the nested repeater to retrieve the other two field values. The documentation describes such a scenario in the section titled “Nested loops”.
The other option would be to create an associative array, but for that, you can’t use
array_push(), you need to use the square bracket notation with the date string as key, like so:
$events[$event_day] = $single_event;
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!