Support

Account

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>';
    }