Widgets are made up of two files:
This is the only required file for widgets. Everything in this file will display on the frontend. It can be as simple as standard HTML or a MailChimp form. Or it can be pulled from the Settings File.
The format of this file is: widget-name.php: (i.e. example.php)
This file holds the fields that will be filled in on the Widget page in the WordPress admin.
The format of this file is: widget-name-form.php: (i.e. example-form.php)
Comment block attributes
Name of Settings Section. Will appear in the section as <h3>
example: My Settings Section
The description of your widget, displayed in the WordPress admin
example: My new cool widget
<?php /* Title: My Widget Description: My new cool widget */ // Let's create a text box field piklist('field', array( 'type' => 'text' ,'field' => 'field_name' ,'label' => __('Example Field') ,'description' => __('Field Description') ,'attributes' => array( 'class' => 'text' ) )); ?>