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

  • Your code is indeed fine. I setup an options page and checked the February blog archive, and it most definitely shows the options page repeater fields using your above code and field names within footer.php. Nor can I think of a reason why that wouldn’t work purely based on ACF…

    Perhaps there is a conditional somewhere in your footer.php that is preventing the above code from executing at all? Have you verified that it gets to the first have_rows() call by outputting something unconditionally, such as

    <pre><?php echo 'Where are my options!?'; ?></pre>
    <div class="section group">
                	<?php if( have_rows('footer_widgets', 'option') ): ?>
    				<?php while( have_rows('footer_widgets', 'option') ): the_row(); ?>                
                        <div class="col span_1_of_2">                        
                            <h2><?php the_sub_field('heading'); ?></h2>
                            <?php the_sub_field('description'); ?>
                            <a href="<?php the_sub_field('button_link'); ?>" class="footer-cta-btn"><?php the_sub_field('button_name'); ?></a> 
                        </div>                 
                   <?php endwhile; ?>
                   <?php endif; ?>
                   </div>

    Or perhaps your archive template is calling a different footer template entirely, using get_footer( $name ) which loads footer-name.php.

    ——————————-

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