Get values from an options page from Acf Repeater

we can be used  get field from an options page, however, a second parameter is required to target the options page in using while loop and get filed value show and front and

for get display filed

<p><?php the_field('field_name', 'option'); ?></p>
<?php

$variable = get_field('field_name', 'option');

// do something with $variable

?>
<?php if( have_rows('repeater', 'option') ): ?>

    <ul>

    <?php while( have_rows('repeater', 'option') ): the_row(); ?>

        <li><?php the_sub_field('title'); ?></li>

    <?php endwhile; ?>

    </ul>

<?php endif; ?>
Social Share

Leave a Comment