Support

Account

Home Forums Bug Reports Repeater Field will not Display First Item

Solved

Repeater Field will not Display First Item

  • Hey there. I’m working on a multi section site using Flexible content. I’m familiar with repeaters and have used them all throughout my site. This one has me stumped.

    I can’t seem to get it to display the first field-set. No matter what I do.

    I can reorder the fields and get that one to display if it’s not first, but then whatever IS first disappears.

    Here’s a collection of images from my dev environment.

    I do hope you can help. This is driving me batty as it defies all logic. :C

  • I finally solved this.

    I made the mistake with the next repeater I wrote too.

    Here’s the code I HAD

    <?php if(have_rows('events_repeater')): the_row();?>
            
         <?php while(have_rows('events_repeater')): the_row();?>

    If you leave the_row off of BOTH of those lines you’ll get a page that loads garbage forever.

    If you have the_row ON BOTH of those, then the first item does not appear.

    You need it on only the “while”

    <?php if(have_rows('events_repeater')): ();?>
            
         <?php while(have_rows('events_repeater')): the_row();?>
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.