How to Use Checkbox in Custom Option Page Using The Setting API

Can you please let me know how I can add a checkbox to Setting API in creating Custom Options Page? I am using the following code to add a txt box which is working perfectly but I am totally confused how to add chechbox to the setting API and options. I just tried ti update the input type to checkbox but I am not sure what to put in Value besides when I save the form the check box still appears unchecked!

                    'Display Paragraph:',

 public function the_option_label_setting()
       echo "<input name='My_Theme_Options[the_option_label]' type='text' value='{$this->options['the_option_label']}'/>";


Answers 0

Related Questions