Widget is used to add feature to you sidebar or anywhere we want to.
We can just simply call the widget in footer or anywhere we want to add it.
It is an easy way out to add feature to your page
To add widget
Go to Appearance > Customize in the WordPress Screens.
Then Widget menu in the Theme Customizer to access to the Widget Screen.
Then down arrow of Widget Area to list the already registered Widgets.
Then Add a Widget button at the bottom of sidebar. It shows the list of available widgets.
Click a widget you want to add.
The Widget will appear in the sidebar
You can see the in your website
To arrange the Widgets within the Sidebar, drag and drop the widgets in the order you want.
To customize the Widget features click the down arrow in the right to expand the Widget's interface.
To remove the widget, click Remove from Widget's interface in above step.
We can add our own personal widget by adding this code in our function.php
register_sidebar( array(
'name' =( 'ad-1', 'oracle' ),
'id' = 'ad',
'description' =( 'Add widgets here to appear in your sidebar.', 'oracle' ),
'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
'after_widget' => '</li>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
ad-1 is the name that will appear
ad is the name that we call in page to add new widget.
0 Comment(s)