How to include checkbox in widget backend form?
First, on function widget: function widget( $args, $instance ) { extract( $args ); // Add this line $your_checkbox_var = $instance[ ‘your_checkbox_var’ ] ? ‘true’ : ‘false’; // Change ‘your_checkbox_var’ for your custom ID // … } On function update: function update( $new_instance, $old_instance ) { $instance = $old_instance; // Add this line $instance[ ‘your_checkbox_var’ ] … Read more