Support

Account

Home Forums Front-end Issues Repeater: First row not showing up

Solved

Repeater: First row not showing up

  • My repeater fields actually work fine, but the first one is not showing up.
    I am not that much into PHP, but here is the code, maybe somebody could identify an issue. Thanks in advance:

    <?php if(has_sub_field('speakers')) { ?>
              <div class="speakers-list clearfix">
                <h2>REFERENTEN:</h2>
                <?php while(has_sub_field('speakers')){ ?>
                  <div class="speaker">
                    <div class="speaker-image">
                      <?php if (get_sub_field('image')[url]) { ?>
                        <img src="<?php echo get_sub_field('image')[url]; ?>" ?>
                      <?php } else { ?>
                        <?php echo get_avatar( '[email protected]', 32 ); ?>
                      <?php } ?>
                    </div>
                    <div class="speaker-content">
                      <h3><span><?php echo get_sub_field('first_name'); ?></span><?php echo get_sub_field('last_name'); ?></h3>
                      <div class="speaker-company"><?php echo get_sub_field('company'); ?></div>
                      <div class="speaker-role"><?php echo get_sub_field('role'); ?></div>
                      <div class="speaker-social">
                        <ul class="list-inline">
                          <?php if (get_sub_field('website') != '') : ?>
                            <li><a href="<?php echo http_check(get_sub_field('website')); ?>" target="_blank"><i class="fa fa-globe fa-lg"></i></a></li>
                          <?php endif; ?>
                        </ul>
                      </div>
                    </div>
                  </div>
                <?php } ?>
              </div>
            <?php } ?>
  • Solved it on my own 😉 First line:
    <?php if(have_rows('speakers')) { ?>

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

The topic ‘Repeater: First row not showing up’ is closed to new replies.