Home › Forums › General Issues › Using True / False ACF in functions.php › Reply To: Using True / False ACF in functions.php
change the opening if statement in your function (assuming your checkbox field has a key of field_asd856f4a8sdf
if( ( $_POST['post_status'] == 'publish' ) &&
( $_POST['original_post_status'] != 'publish' )
( !empty( $_POST['fields']['field_asd856f4a8sdf'] )
) {
check the source code after your page loads to determine the acf key. it will look like that one i’ve put there, even though i made that one up.
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.