• Resolved kmgreek

    (@kmgreek)


    Is it possible to use the “Output Table HTML” code you provide to work with a repeater field? I currently have a repeater field setup with Table and I’m trying to figure out how to show/display the results on a page.

Viewing 1 replies (of 1 total)
  • Plugin Author Johann Heyne

    (@jonua)

    // check if the repeater field has rows of data
    if( have_rows('repeater_field_name') ):
    
         // loop through the rows of data
        while ( have_rows('repeater_field_name') ) : the_row();
    
            // get a sub field value (table field)
            $table = sub_field('sub_field_name');
            
            // use the “Output Table HTML” code with $table   
    
        endwhile;
    
    else :
    
        // no rows found
    
    endif;
    • This reply was modified 7 years, 9 months ago by Johann Heyne.
Viewing 1 replies (of 1 total)

The topic ‘Template Repeater Field with Table’ is closed to new replies.