1
votes

I am using ACF repeater field in Wordpress Multisite template. Fields showing in its admin panel and I can add content using back end. But those data not showing in front end. This is my code to retrieve data.

<?php if(get_field('history')): ?>

<?php while(has_sub_field('history')): ?>
    <div class="col-lg-3 history">
        <h3><?php the_sub_field('year'); ?></h3>
        <div class="description"><p><?php the_sub_field('description'); ?></p></div>
    </div>
<?php endwhile; ?>

I have 3 sites.

  1. /xx
  2. /xx
  3. /xx

How can I show data in front end..?

1

1 Answers

1
votes

I believe your if statement is incorrect. its should probably ready if(get_sub_field('history')):