Home › Forums › Add-ons › Repeater Field › Translate date inside Repeater field. › Reply To: Translate date inside Repeater field.
sorry, that’s a typo on my part, it should be have_rows()
if (have_rows('repeater_field_name')) {
$dates = array();
while(have_rows('repeater_field_name')) {
the_row();
$date = get_sub_field('date_subfield_name');
if ($date) {
$dates[] = date_i18n('j \d\e\ F \-\ G \h\s', strtotime($date_3));
}
} // end while have rows
if ( $dates) {
echo '<h5>UPCOMING EVENTS</h5><p> ' . implode(' | ', $dates) . '</p>';
}
} // end if have rows
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.