Support

Account

Home Forums Add-ons Repeater Field Repeater field shortcode? Reply To: Repeater field shortcode?

  • In PHP, if I were to edit the template I would create a loop for the repeater.

    
    <?php 
      if (have_rows($repeater_field)) {
        while (have_rows($repeater_field)) {
          the_row;
          the_sub_field($sub_field_name);
        }
      }
    ?>
    

    This could be use to create a list of items or other layouts depending on what you’re doing with it.

    I don’t know how your theme’s page builder works, or how you’d go about doing that in your theme. I don’t use themes with page builders, I generally build custom themes and I’d just build a template for the custom post type and code the entire thing by hand.

    The ACF shortcode really isn’t meant for repeater fields, but it can be done if you know the field name stored used to store the field in the database.