Support

Account

Home Forums Add-ons Repeater Field Append more items with repeater filed.

Helping

Append more items with repeater filed.

  • Hi

    I created a masonry layout by CSS, it’s gonna be load my repeater fields images, i limited my filed by the following code.

    if( have_rows('upload-masonry') ):
     $i = 0;
        while ( have_rows('upload-masonry') ) : the_row('5');
        $i++;       
                if( $i > 8 )
                {
                    break;
                }
    ?>            
                    <span><img src="<?php the_sub_field('image');?>"></span>          
     <?
        endwhile; 
    else :
     
        // no rows found
    endif;

    The code is loading 9 images per refresh, i want to implement load more icon to load more images.

    So basically implementing append icon using jQuery is pretty easy, but the thing what i’m asking here is, i have no idea how to call PHP into jQuery, which is not possible unless using AJAX.

    I was hoping if you guys have an other way to append more items using PHP(?) or give me a solution.

    Thank you!

  • Hi Amir,

    I’m sorry that i don’t have a solution .. (yet). I would like to build this myself, so that’s why i’m replying. With the hope that you’ve solved this ‘problem’ already.

    So if you have, would you like to share it?

    Thanks,
    Joep

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Append more items with repeater filed.’ is closed to new replies.