Home › Forums › Front-end Issues › If statement for True/False field › Reply To: If statement for True/False field
Hi @will-lawrencefuturform-co-uk
Could you please make sure that the get_field()
function returns the correct value? Could you please debug it like this:
var_dump( get_field('custom_acf') );
If that doesn’t return the correct data, it’s possible that the get_field()
function is loaded outside of The Loop. In this case, could you please pass the post ID to the get_field()
function like this:
get_field('custom_acf', 99)
Where ’99’ is the post ID.
If still no joy, could you please share the JSON or XML export file of your field group so I can check your setup?
Thanks 🙂
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.