X
X
xaruki2020-04-16 16:39:54
WordPress
xaruki, 2020-04-16 16:39:54

How to display last 4 records (rows) through ACF Repeater?

Greetings.

There is a standard output:

<?php if( have_rows('clients') ): ?>

  <?php while( have_rows('clients') ): the_row(); 

    // vars
    $link1 = get_sub_field('clients_link');
    $link2 = get_sub_field('clients_site');
    ?>

    <div class="client-block-info">
      контент
    </div>

  <?php endwhile; ?>

<?php endif; ?>


Tell me how to display the last 4 records (rows).

Thank you!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question