Plugins Plugin hub Backup SEO Caching Security Forms WooCommerce Images Best backup plugins
Hosting Hosting directory Shared hosting Managed WordPress Cloud hosting VPS hosting By reader location Hosting finder
Themes & builders Compare Rank Math vs Yoast
Tools All tools Hosting finder Plugin stack builder Cost calculator Salt generator Theme detector Who is hosting this? Speed test Headline analyzer robots.txt generator Redirect generator Uptime calculator Blog name generator
Blog Best backup plugins Deals
Guides All guides Speed up WordPress Choose hosting Back up WordPress
How we test

Explainers · Explainer

What Is a Widget? A Plain Explanation

What Is a Widget? A Plain Explanation

Short answer

A widget is a small block of content or a feature, such as a search box, a list of recent posts, or a calendar, that you place in a sidebar, footer, or other widget area of your site. Widgets need no code: you add, remove, and rearrange them from Appearance, then Widgets, or from the Customizer. In block themes, widget areas are edited in the Site Editor instead.

Key takeaways

  • A widget is a small feature, like a search box or a calendar, placed in a sidebar, footer, or other widget area.
  • Widgets need no code and are managed from Appearance, then Widgets, or from the Customizer.
  • The block-based widgets editor arrived in WordPress 5.8 for classic themes.
  • Block themes have no Widgets menu; sidebars and footers are edited in the Site Editor.
  • Old widgets still work through the Legacy Widget block, and the Classic Widgets plugin restores the old screen.
  • Switching themes saves your widgets in the Inactive Widgets area, where you can add them back.

What is a widget in WordPress?

A widget is a small block of content or a feature that you place in a sidebar, footer, or other widget area of your site.

WordPress.org explains that widgets add content and functionality to a widget area, and that plugins often add their own widgets too. A search box, a list of recent posts, a calendar, and a newsletter signup form can all be widgets.

Widgets need no code. WordPress.org says they can be added, removed, and rearranged from the Theme Customizer or from Appearance, then Widgets, in the admin screens. You drag one into place, fill in its settings, and it shows on the site.

How do widgets and blocks differ?

A widget is the older way to add a small feature to a sidebar, while a block is the newer building unit used across posts, pages, and widget areas alike.

Blocks arrived with the block editor in WordPress 5.0, and the block-based widgets editor followed in WordPress 5.8, according to the Make WordPress Core dev note. The new editor lets you add blocks to widget areas with the same interface used to write posts.

Under the hood, the two systems share storage. The Widgets screen is itself a block editor built with React, the same library behind the post editor, according to the Make WordPress Core dev note.

The Block Editor Handbook explains that a block added to a widget area is stored as a special HTML widget, called a block widget, while a widget block gives old widgets a block-style interface with edit and preview modes.

If you want to build your own block, our guide to creating a custom block covers the steps.

What are widget areas?

A widget area is a spot your theme sets aside for widgets, usually a sidebar or a footer.

WordPress.org notes that the widget area is pre-defined by the theme and varies from theme to theme. Most themes offer a sidebar and one or more footer areas, and some place widget areas in the header or below the content too.

The Twenty Seventeen theme, for example, has a widget area in the footer of every page.

A theme decides how many widget areas exist and where they sit, so two themes can show the same widgets in very different places. If your theme has no widget area where you want one, our guide to adding a custom widget area shows how a developer adds it.

What widgets come with WordPress?

WordPress ships with a small set of built-in widgets, and plugins can add more.

WordPress.org names Categories, Tag Cloud, and Search among the default widgets, and gives the Text widget and the RSS widget their own sections. The built-ins cover the common jobs:

WidgetWhat it shows
SearchA search box for your site
CategoriesLinks to your post categories
Tag CloudYour tags, sized by how often they are used
TextText, images, video, or custom HTML
RSSThe newest items from an outside feed

The RSS widget shows 10 items by default, and you can pick any number from 1 to 20. The Categories widget lists your post categories, and our guide to categories vs tags explains how the two differ.

The Text widget holds text, video, images, and custom lists, and it offers an “Automatically add paragraphs” option that wraps each block of text in a paragraph tag. Note that PHP code does not run in a Text widget, since the widget strips out code it cannot display.

How do you add a widget to your site?

Open Appearance, then Widgets, pick a widget area, and add a block or widget to it.

WordPress.org gives the steps for the block-based editor: go to Appearance, then Widgets, click the widget area you want to change, and use the + prompt to add a block. You can search for the block you want or pick Browse All to see the options.

You can move items between areas two ways: drag and drop from the block toolbar, or use the toolbar option that moves the item to another widget area.

Old widgets still work too: you edit them through the Legacy Widget block, which shows the widget's normal settings form. In the Customizer, the same work happens under Appearance, then Customize, then Widgets, with a live preview of your changes.

How do widgets work in block themes?

In a block theme, widget areas no longer exist, and you edit sidebars and footers in the Site Editor instead.

WordPress.org states that block themes such as Twenty Twenty-Five use the Site Editor, so the Appearance, then Widgets menu is removed on purpose. Editing happens through patterns, template parts, and other Site Editor features.

The change is a matter of where the controls live, not what you can build. A sidebar in a block theme is a template part filled with blocks, and a footer works the same way.

Our guide to block themes vs classic themes explains the split in full. If your theme is a classic theme, the Widgets screen stays exactly where it has always been.

What is the Legacy Widget block?

The Legacy Widget block lets you keep using old widgets inside the block-based widgets editor.

The Make WordPress Core dev note explains that existing widgets and third-party widgets keep working and can be used beside blocks.

The Legacy Widget block, with the identifier core/legacy-widget, has three states: Select, where you pick a widget from a list; Edit, where you fill in its settings form; and Preview, where you see how it will look on the site.

The block is not available in other block editors, such as the post editor. If you would rather go back to the classic Widgets screen entirely, WordPress.org says you can install and activate the Classic Widgets plugin, which restores the original view.

How do you check widgets on your site?

Open Appearance, then Widgets, and compare each widget area with what your visitors see on the front of the site.

Check each area one at a time. A widget can be saved but hidden by the theme, or placed in an area the theme never displays, so the admin screen alone does not prove it shows.

Preview the site after each change, and look at a post page as well as the home page, since sidebars can differ by page type.

If a widget is missing, look in the Inactive Widgets area at the bottom of the Widgets screen. WordPress.org explains that when you switch themes, your widgets and their settings are saved there, so you can add them back at any time.

If a widget still does not show, our guide to fixing widgets that do not show walks through the causes.

What mistakes should you avoid with widgets?

The three big mistakes are stuffing the sidebar, using a widget for content that belongs in a page, and switching themes without checking the Inactive Widgets area.

A sidebar with ten widgets pushes your main content down and slows the page, since each widget adds its own output.

Keep the sidebar short and put each widget where it earns its place. A widget is also the wrong home for long text: a Text widget can hold a paragraph or two, but a full article belongs on a page or a post.

Theme switches catch people out. Widget areas differ from theme to theme, so a new theme may have fewer areas or different names, and your widgets land in the Inactive Widgets area instead of vanishing.

Check there first before you rebuild anything. And remember that a widget area is set by the theme, so a widget you add to the footer will not appear in the sidebar.

What myths about widgets are wrong?

Three common myths are that widgets are gone in new WordPress versions, that widgets need code, and that widgets slow down every site.

Widgets are not gone. The block-based widgets editor arrived in WordPress 5.8, and block themes moved widget editing into the Site Editor, but classic themes still show the Widgets screen, and old widgets still work through the Legacy Widget block.

The widget system itself dates back to WordPress 2.8, when the storage mechanism for widgets was added, according to the Make WordPress Core dev note.

Widgets also need no code at all. They were built to give design control to site owners without coding, and the whole point of the Widgets screen is drag and drop.

Finally, a widget only slows a site when it does heavy work, like pulling a remote feed on every page. A plain Search or Categories widget costs almost nothing.

Frequently asked questions

Are widgets gone in new WordPress versions?

No. Classic themes still show the Widgets screen, and old widgets still work through the Legacy Widget block. Block themes moved widget editing into the Site Editor, where sidebars and footers are template parts filled with blocks. The widget system itself dates back to WordPress 2.8.

Where did my widgets go after I changed themes?

Open Appearance, then Widgets, and look in the Inactive Widgets area at the bottom of the screen. When you switch themes, your widgets and their settings are saved there. Drag the widget back into an active widget area to show it again.

Can I still use old widgets with the block editor?

Yes. The Legacy Widget block lets you edit any old or third-party widget inside the block-based editor, showing its normal settings form. If you prefer the classic screen, install and activate the Classic Widgets plugin to restore it.

What is the difference between a widget and a block?

A block is a building unit used in posts, pages, and widget areas, while a widget is the older way to add a small feature to a sidebar or footer. Since WordPress 5.8, the Widgets screen is a block editor, and blocks added to widget areas are stored as block widgets.

Do widgets slow down WordPress?

In most cases, no. A plain Search or Categories widget costs almost nothing. A widget only slows a page when it does heavy work, like pulling a remote feed on every visit. Keep sidebars short and check each widget's cost before you blame widgets as a group.

Can I add HTML to a widget?

Yes, with limits. A Text widget holds text, images, video, and custom HTML, and it can wrap each block of text in a paragraph tag. PHP code does not run in a Text widget, since the widget strips out code it cannot display.

Sources

  1. Manage WordPress widgets WordPress.org
  2. Block-based Widgets Editor WordPress.org
  3. Block-based Widgets Editor in WordPress 5.8 Make WordPress Core
  4. @wordpress/edit-widgets WordPress Developer Resources

Is your product missing, or something out of date?

Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.

About the editors

Written and checked byWPLegible Editorial Team Independent WordPress reviews and guides

Researched from the primary sources listed above and checked against our editorial rules before publishing.