Home › Forums › Front-end Issues › ACF Not working inside WordPress Loop › Reply To: ACF Not working inside WordPress Loop
I ended up figuring out the issue. I had to add new vars to the header
$archive_subheading = get_field( ‘archive_subheading’ );
Then I had to add the following conditional formatting to trigger the ACF code inside the loop.
<?php if( $archive_subheading ) : ?>
<h2 class=”customsub”><?php echo $archive_subheading ?></h2>
<?php endif; ?>
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.