Support

Account

Home Forums Backend Issues (wp-admin) How to check a box when saving a post? Reply To: How to check a box when saving a post?

  • What if there’s multiple choices?

    $status_active = get_field('breaking_news_status', $post_id) == 'active';
                    if (!in_array('breaking_news_status', $status_active)) {
                        $status_active[] = 'status_locked';
                        update_field('breaking_news_status', $status_active, $post_id);
                    };