Home › Forums › General Issues › If True do this / False do that › Reply To: If True do this / False do that
You could start by dumping the raw data that get_field gets for you and see if that matches your expectations in various scenerio’s (checked, unchecked, field not existing).
I use a snippet like this to dump things (because I don’t like how var_dump() looks):
echo "<pre style=\"text-align:left;padding:10px;border:1px solid red;background-color:#fff;color:#111;font-family:Courier;\">";
print_r( get_field( 'featured' ) );
echo "</pre>";
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.