Home › Forums › Front-end Issues › Code No Longer Working › Reply To: Code No Longer Working
I don’t see anything in your code that would keep it from working. Not sure what’s going on. I would try using === instead of ==
<? if( get_field('post_label_status') === 'Sponsored' ){ ?>
<div class="post-status-label-feed">
<span>Sponsored Content</span>
</div>
<? } ?>
<? if( get_field('post_label_status') === 'Opinion' ){ ?>
<div class="post-status-label-feed">
<span>Opinion Piece</span>
</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.