Widgets

Widgets are one of the native mechanisms in WordPress. Their main purpose is to provide us with an easy-to-use way of customizing the sidebars, footers, and headers of our sites, with the addition of extra content. Even though the most common placement of widgets is indeed the sidebar, the only actual rule is that a widget must be displayed inside a widget area, and a widget area can be anywhere a theme developer wants it to be. Common widgets contain the following:

These days, nearly all themes are widget-enabled, with one or more widget areas available for use. If I were to simplify this a bit, I'd say that widget areas behave like locations for menus.

To control the widgets on your new website, do the following:

  1. Navigate to Appearance | Widgets. Twenty Nineteen comes with just one widget area. It's called Footer, as shown in the following screenshot:

  1. As the name indicates, this widget area appears in the footer of the site. The way you work with widgets is very simple. The only thing you have to do is take any of the widgets visible on the left-hand side and drag and drop them into the right-hand area under any of the available widget areas. For example, let's take the Navigation Menu block and drag it all the way to Footer. The result is as shown in the following screenshot:

  1. Now, we can give this block a title and also use the dropdown to select the custom menu we want to include in this widget. Currently, there's only one menu, which we created a while ago, Main. Once we click on the Save button (visible in the preceding screenshot), our menu is going to be added in place.
  2. At this point, we have the main menu displayed twice on the site. There's one in the top area, and the second one is inside the footer. As you can see, if you want to place a menu somewhere on the site, you have two ways of doing so. You can either assign it inside the Appearance | Menus section, or use it as a navigation menu widget and place it in any widget area that your theme supports.
  3. Enabling any other type of widget is very similar to the process described just now. All you need to do is drag the widget you like and drop it onto the area where you want to have it displayed. Then, once the widget is in place, you can adjust its settings and content.
  4. When it comes to working in the Appearance | Widgets section, you can click on the little down arrow to the right of any widget to expand the details and see the options. You can drag a new widget in from the collection of available widgets on the left, you can drag existing widgets up and down to change their order, and you can delete a widget by expanding it and then clicking on Delete.
  1. Experiment with putting widgets into different widget areas and then refresh your blog to see what they look like. Always be sure to click on Save if you make any changes to a widget.
  1. Also, at the bottom of the screen, there's one more section labeled Inactive Widgets, as shown in the following screenshot. Many widgets have their settings and parameters. Therefore, even if you don't want to display a particular widget on your site at the moment, but don't necessarily want to lose its settings (in case you'd like to use the widget again in the future), this section is where you put it. Just like the label says, it's where you can drag your widgets to remove them from display but keep their settings. This is also where you will find any widgets that were previously active, but that got deactivated automatically after switching to a theme that didn't use the same widget area naming convention: