March 2020
Beginner
660 pages
18h 28m
English
In this widget, we have two options for customizing the title and number of pages to display. So, we start the form function by receiving the existing values of the title and number options. The form function has a default parameter called $instance. This object contains all the existing option values for the widget, and data is automatically populated by the WP_Widget class. Next, we have two input fields for the title and number. The WP_Widget class contains two functions, called get_field_id and get_field_name. These two functions are used to get the ID and name for the field by passing the field name of our choice. You can add any number of fields and different field types based on the ...
Read now
Unlock full access