Home › Forums › General Issues › If True do this / False do that › Reply To: If True do this / False do that
Hi, I don’t seem to be able to get this working using the following:
<?php if ( get_field( 'featured' ) ): ?>
<div class="featured">
<?php else: ?>
<div class="not-featured">
<?php endif; ?>
<div class="not-featured">
Is outputted if the featured True/False field is checked or not.
Any ideas what I’m doing wrong?
Cheers.
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.