Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Ryan Kienstra

    (@ryankienstra)

    Hi @wiwimaster,
    Thanks for bringing that up.

    Here’s a basic way of outputting the repeater in a template:

    
    $repeater_name = 'example-repeater-name';
    
    if ( block_rows( $repeater_name ) ) :
    	while ( block_rows( $repeater_name ) ) :
    		block_row( $repeater_name );
    		echo block_sub_value( 'example-field-name' );
    		echo block_sub_value( 'another-field-name' );
    	endwhile;
    	reset_block_rows( $repeater_name );
    endif;
    
    Thread Starter wiwimaster

    (@wiwimaster)

    Excellent – works perfect and I could remove 40 single fields into a repeater with 2 fields.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use the repeater field’ is closed to new replies.