Home › Forums › Add-ons › Repeater Field › Target first entry › Reply To: Target first entry
You can get the value of the repeater field as an array by doing the following:
$gig_dates = get_field('gig_dates_repeater');
At this point $gig_dates
is an array of arrays with each sub array representing a single row in the repeater, so to get the first one simply do $gig_dates[0]
. This will return another array containing the sub fields of the corresponding row, for example:
array(
'gig_date' => 'Feb 5th',
'gig_title' => 'Gig title'
);
I hope this helped.
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.