OK so it’s probably more a regular coding issue than an ACF one but would still be grateful for any suggestions on best way to approach working with rows of sub fields which can be handled in groups (for formatting etc). Multidimensional array maybe?
$name = get_sub_field(‘name’); // John Joan Ravi Devi Olaf Freya
$fruit = get_sub_field(‘fruit’); // apples oranges apples mangoes oranges apples
$when = get_sub_field(‘when’); // breakfast breakfast lunch dinner breakfast lunch
To get this (could be grouped either by fruit or time):
John likes apples at breakfast
Ravi likes apples at lunch
Freya likes apples at lunch
Joan likes oranges at breakfast
Olaf likes oranges at breakfast
Devi likes mangoes at dinner
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users