Home › Forums › Add-ons › Repeater Field › Translate date inside Repeater field. › Reply To: Translate date inside Repeater field.
I tried this and it gives me the following error > FATAL ERROR: CALL TO UNDEFINED FUNCTION HAVE_ROW()
I’m sure I’m doing something wrong, this is the code:
function adb_display_custom_fields() {
echo '<div class="curso-meta">';
if (have_row('dates')) {
$dates = array();
while(have_row('dates')) {
the_row();
$date = get_sub_field('date');
if ($date) {
$dates[] = date_i18n('j \d\e\ F \-\ G \h\s', strtotime($date));
}
} // end while have rows
if ( $dates) {
echo '<h5>UPCOMING EVENTS</h5><p> ' . implode(' | ', $dates) . '</p>';
}
} // end if have rows
echo '</div>';
}
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.