Support

Account

Home Forums Add-ons Options Page Option field value not loading on Archive page Reply To: Option field value not loading on Archive page

  • Hi FrankiesFolio,

    In order to get an option field from an ACF Options Page, you need to use the string ‘option’ as the $post_id parameter in your get_field() call. How to get values from an options page documentation.

    The location of the call in your templates should not matter.

    Here is some sample code to get values from an options page repeater:

    
    <?php if( have_rows('repeater-field-name-or-field-key', 'option') ): ?>
        <ul>
        <?php while( have_rows('repeater-field-name-or-field-key', 'option') ): the_row(); ?>
            <li><?php the_sub_field('page_for_posts'); ?></li>
        <?php endwhile; ?>
        </ul>
    <?php endif; ?>
    

    ————————————————–

    Help your fellow forum-goers and moderation team; if a response solves your problem, please mark it as the solution. Thank you!