I am creating one custom setting panel, my codes are
function custom_text_field_html(){
$text = get_option( 'homepage_text' );
printf(
'<input type="text" id="homepage_text" name="homepage_text" value="%s" />',
esc_attr( $text )
);
}
function custom_checkbox_field_html(){
$checkbox = get_option( 'disabletitle_text' );
printf(
'<input type="checkbox" id="disabletitle_text" name="disabletitle_text" value="1" />',
esc_attr( $checkbox )
);
}
my checkbox data is not saving, how to save checkbox data like 'text field', so that I can call them in functions, if someone checked the field 'enable that function', if someone 'not checked the field', disable the function.
I referred this http://qnimate.com/add-checkbox-using-wordpress-settings-api/, but it's showing error in my case