Support

Account

Home Forums Add-ons Repeater Field Build a Table with Repeaterfield Reply To: Build a Table with Repeaterfield

  • More than likely there is a problem with ACF finding the right post to get the information from, you may need to tell ACF what post id to get it from

    
    [insert_php]
    
    global $post;
    
    // Wenn mindestens 1 Datensatz vorhanden ist
    if( have_rows('stellen_ds', $post->ID) ) {
    <table><tr><td>Stelle</td><td>Ort</td></tr>
    while( have_rows('stellen_ds', $post->ID)) : the_row();
    
    // Bezeichnung aus Feld laden
    $bezeichnung = get_sub_field('bezeichnung');
    
    // Ort aus Feld laden
    $ort = get_sub_field('ort');
    
    // Anhang Text aus Feld laden
    //$anhang = get_sub_field('anhang');
    
    echo '<tr><td>';
    echo $bezeichnung;
    echo '</td><td>';
    echo $ort;
    echo '</td></tr>';
    
    // 3 Felder ausgeben
    
    //echo $anhang;
    
    endwhile;
    
    echo '</table>';
    }
    
    [/insert_php]