Home Forums Add-ons Repeater Field Basic table display of repeater fields Reply To: Basic table display of repeater fields

  • Hi rywn

    I have a similar sort of issue to musiconvinyl above. Hoping you can help me?

    I want to have my data outputted in a sort of table. Like this website:

    So because I am quite new to custom fields and the repeater plugin I started by watching Elliot Condons video on Vimeo. I copied his code only I used my own names etc. Like this:

    <?php if(get_field(‘vessels’)):?>

    <div class=”vessel”>

    <?php while(has_sub_field(‘vessels’)): ?>

    ” />

    <?php the_sub_field(‘name’); ?>
    <?php the_sub_field(‘type’); ?>
    <?php the_sub_field(‘year’); ?>
    <?php the_sub_field(‘lxb’); ?>
    <?php the_sub_field(‘pull’); ?>
    <?php the_sub_field(‘passengers’); ?>
    <?php the_sub_field(‘spec’); ?>

    <?php endwhile; ?>

    <?php endif; ?>


    the outcome at the minute looks like this:

    I can’t figure out why the image isn’t showing. When my code to me doesn’t look any different than Elliots. Any ideas?

    I just wanted to get all my fields showing first then I was going to use div’s to lay them out. Not sure if this is the best way to create a table sort of look. So if you think I’m going about it wrong any suggestions would be much appreciated.