how to save checkbox data for custom setting?
Your checkbox data is saved as 1 or ” if someone checked or unchecked it. you can also verify this using var_dump($checkbox) inside custom_checkbox_field_html function This should work. function custom_checkbox_field_html(){ $checkbox = get_option( ‘disabletitle_text’ ); $is_checked = ( $checkbox != ” && $checkbox == 1 ) ? ‘checked’: ”; printf( ‘<input type=”checkbox” id=”disabletitle_text” name=”disabletitle_text” value=”1″ … Read more