Support

Account

Home Forums Add-ons Repeater Field Repeat Row's instead of Column's..?..Need help

Unread

Repeat Row's instead of Column's..?..Need help

  • Hi everyone,
    I am a UI developer, and very new in WordPress development!

    Actually, I am using the ACF Repeater field, where I want to repeat Rows instead of Columns.
    Let me explain with a real example:

    <!– row-1 –>
    <div class=”row”>
    <div class=”col”></div>
    <div class=”col”></div>
    <div class=”col”></div>
    </div>

    <!– row-2 –>
    <div class=”row”>
    <div class=”col”></div>
    <div class=”col”></div>
    <div class=”col”></div>
    </div>

    <!– row-3 –>
    <div class=”row”>
    <div class=”col”></div>
    <div class=”col”></div>
    <div class=”col”></div>
    </div>

    and so on…

    I want to achieve this output from ACF Repeater.

    Let me share my existing code here:

    <div class=”container”>
    <div class=”row justify-content-around”>

    <!– repeater-loop –>
    <?php if (have_rows(‘kp_team_pakistan_boxes’)) : ?>

    <?php while (have_rows(‘kp_team_pakistan_boxes’)) : the_row();

    // vars
    $team_member_image = get_sub_field(‘team_member_image’);
    $team_member_name = get_sub_field(‘team_member_name’);
    $team_member_designation = get_sub_field(‘team_member_designation’);

    ?>

    <div class=”col-md-4 col-lg-4″ id=”total-col-<?php echo get_row_index(); ?>”>
    <div class=”team-mem-box”>

    ” alt=”<?php echo $team_member_image[‘alt’] ?>” class=”img-fluid” />
    <div class=”team-mem-detail yellow-bg-color text-center”>
    <h2> <?php echo $team_member_name; ?> </h2>
    <p> <?php echo $team_member_designation; ?> </p>
    </div>


    </div>
    </div>

    <?php endwhile; ?>

    <?php endif; ?>
    <!– repeater-loop –>

    </div>
    </div>

    ——————

    I am very happy if someone helps me in this regard!
    email: [email protected]

Viewing 1 post (of 1 total)

The topic ‘Repeat Row's instead of Column's..?..Need help’ is closed to new replies.