D
D
DeniSidorenko2019-12-08 15:13:53
WordPress
DeniSidorenko, 2019-12-08 15:13:53

Ajax loading of items FlexibleContent ACF PRO WordPress?

Good afternoon, I use ACF PRO and FlexibleContent.
The conclusion goes like this

<?php while( have_rows('broadcast') ): the_row(); ?>
        <?php if( get_row_layout() == 'plan' ): ?>
          <?php 
            $photo = get_sub_field('photo');
            $name = get_sub_field('name');
            $text = get_sub_field('text');
            $video_href = get_sub_field('video_href')
          ?>
 ###### Code
<?php endif; ?>
      <?php endwhile; ?>

The question is, is it possible to make the output limited to only 8 items and loaded with ajax when the button is clicked?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Neverov, 2019-12-08
@DeniSidorenko

Make a counter. Count 8 points, do not display the rest. You add a button, when clicked, a request is sent to the server, which returns the rest of the menu items. WordPress has great models for building its API.
Automatically, by means of the ACF itself, this cannot be implemented.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question