How to Use Widgets in WordPress
Widgets comprise various on-page elements which can be displayed in the sidebar on your WordPress blog or website as well as in any other widget areas defined by your currently active theme. Some themes include widget areas in the header or footer of your page among other locations. A default installation of WordPress comes with a number of widgets which can add additional functionality to your blog, such as a tag cloud, search box or even just a simple text box containing text, media or HTML code. Certain plugins also add widgets to your WordPress blog. For example, the popular WP-Polls plugin allows you to create and configure on-site polls which are displayed on your website by way of a widget. This guide takes a look at how to use and configure widgets.
1 – Using Built-in Widgets
WordPress comes with many widgets already, including a calendar, recent comments and recent posts.
- In your administrator dashboard, navigate to Appearance > Widgets to visit the Widgets configuration page.
- The available widgets are displayed in the left-side column. To activate an available widget, simply drag it to the column to the right and it will appear immediately on your website. The available locations where you can display widgets vary depending on your active theme. For example, with the default Twenty Fourteen theme, you should see three widget areas including the Primary Sidebar, Content Sidebar and Footer Widget Area. The Twenty Fourteen theme, among many others, also provide a short description of where the widget area appears on your actual website.
- To configure an active widget, simply click on its name to access the various options.
2 – Installing Additional Widgets
Additional widgets usually come with relevant plugins. Many plugins which add additional user interaction to your blog provide a widget feature.
- To install a new plugin, navigate to Plugins > Add New, and search for the plugin you want to install. For example, if you want to add polls to your website, you may want to try the WP-Polls plugin. Once your chosen plugin has been downloaded and installed, be sure to click “Activate Plugin”.
- If the new plugin comes with a widget, it should now show up when you return to the Widgets page. You will now be able to use it in exactly the same way as you would use any widget which comes with the default WordPress installation.
More advanced users can configure widget areas and the way in which they are displayed by editing the code found in the widgets.php file. This is accessible from the Appearance > Editor page or from the Themes folder of your WordPress installation.