In WordPress, widgets get less attention than many of the more important elements of a website like posts and pages. Widgets are only used in a few areas of your website, but it’s important to understand what they do and how they work.
What is a widget?
A widget is a small block of content that adds information to a specific area on your website. Widgets were originally designed to provide a simple and easy-to-use way of giving design and structure control of a WordPress theme to the user. Some widgets provided dynamically-created data from the website easily, while others rely on user input.
Some widgets provide dynamic content. In other words, the widget’s content is loaded based on requested criteria. This includes data like a “tag cloud” of most-used tags, a list of most-read posts, or a list of most recent comments. Some load static content like a search box. Other widgets allow a user to select data to be shown, like a particular image, video, menu, or even simply text.
Building a sidebar with widgets
For themes that use sidebars, widgets compose the content there. Some themes allow you to create multiple sidebars to use in different locations. Other themes and plugins also add additional sidebar options. For example, some themes add an additional sidebar to be used with WooCommerce pages.
Building a footer with widgets
Many themes also use widgets to compose content for a site’s footer. Different themes provide different options for the site footer. Some themes provide multiple footer columns, each of which can be composed of its own separate widgets. On a computer, these columns appear side by side, and on mobile, they appear one after another vertically, with similar function to a content block or grid layout.
Building pages with widgets
Though not as common as sidebar and footer widgets, some themes even use widgets to build entire pages. Many times, these themes come with extra widgets to give users additional options for building pages. These themes often compromise customization options with simplicity in mind. In some cases, a user can choose to create a regular page instead of using the widget-driven option, but this is not always the case.
How to use widgets
Using widgets in WordPress is very simple. In the WordPress Dashboard, go to Appearance → Widgets. On the right side of the screen, a list of available areas to drop widgets — sidebar, footer, etc. — appears. The left side of the screen features a list of available widgets. It looks similar to the image above but may include additional options.
To add a widget to an area of your site, click the down area next to the area you want to place a widget so that the menu opens to display widgets already there. Next, simply drag a widget into this area of the site. Some widgets require additional information from you; for example, you’ll want to type text into the text widget or choose an image in the image widget. Once you’ve dragged a widget a widget into an area of your site and added the information the widget requests, the widget will begin appearing in that location on your website.