Home › Forums › Add-ons › Options Page › Option field value not loading on Archive page › Reply To: Option field value not loading on Archive page
Thank you for the quick response. The option values appear on the footer of every page/post EXCEPT the archive.php template, which leads me to believe the problem is similar to this FAQ. I cannot figure out how to get this solution to work because I am dealing with option page fields + sub fields.
I think the code is fine, please see below.
<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>
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.