Trusted WordPress tutorials, when you need them most.
Beginner’s Guide to WordPress
WPB Cup
25 Million+
Websites using our plugins
16+
Years of WordPress experience
3000+
WordPress tutorials
by experts

What is: Widgets

In WordPress, widgets are content elements that you can add to your site’s sidebars, footers, headers, and other areas that are not a part of your main content.

If you ever see a WordPress blog with a sidebar that contains links to the blogger’s social media or related post recommendations, those elements are most likely widgets. Other common types of widgets are calendars, banner ads, search bars, and so on.

You can use widgets if you use a non-block WordPress theme that offers widget areas. In this case, you will see a Widgets section in your WordPress dashboard’s menu. That’s where you can see your theme’s available widget areas and add widgets to the theme.

What are Widgets in WordPress

What Is the Purpose of a Widget in WordPress?

The purpose of a WordPress widget is to display various types of content in different areas of your website (e.g. the sidebar, footer, or header) without editing the theme’s code directly.

These widget areas are useful for showing additional information on a page without distracting users from the main page content.

Examples of widgets in WPBeginner

WordPress comes with default widgets that you can use, such as archives, calendars, latest posts, navigation menu, social media icons, RSS feed, tag cloud, categories list, and so on.

Are Widget Areas and Widgets Different?

Widget areas are the places where you can insert widgets, while widgets are the specific content elements that you add to those widget areas.

Different WordPress themes will come with different widget areas. They may be in the header, footer, sidebar, right below your blog post content, and almost any other area.

Here is an example of the available widget areas in the Astra theme:

Widget areas in the Astra theme

Typically, all pages on your WordPress website will have the same widget areas. This means that the same widgets will appear across your entire website.

That said, there are ways you can make certain widgets appear on specific pages only. This may be useful if you want the widgets on your homepage to look different from the ones on your blog posts.

You can read our article on how to show or hide widgets on specific pages for step-by-step guidance. Also, check out our guide on how to display different sidebars for each post and page in WordPress.

What Is the Difference Between a Widget and a Block?

In WordPress, blocks are content elements you can add to your pages and posts. Widgets are essentially the same thing but the difference is you add them to your theme’s widget areas.

As of WordPress 5.8, the difference between widgets and blocks has become less noticeable. This is because widgets use a similar block-based editor as the Gutenberg editor for pages and posts, where you can drag and drop blocks to widget areas.

The default WordPress blocks are also available as widgets to add into available widget areas.

You can read more about widgets and blocks in our article about WordPress widgets vs blocks: what’s the difference?

What Is the Difference Between a Widget and a Plugin?

A WordPress plugin is an extension you install to activate custom features for your entire website. Meanwhile, a WordPress widget is a content element you add to widget areas of your pages, like sidebars, footers, headers, and so on.

Some plugins offer their own widgets you can add to your widget areas. For example, if you use WPForms, you can create and manage contact forms to receive visitor questions. Here is what the plugin page looks like:

WPForms plugin page

Once you have created a contact form, you can go to the Widgets page on your WordPress dashboard and add the form widget to one of your widget areas.

This feature is available whether you use the paid or free plugin.

The WPForms widget in the block widget editor

Other examples of plugins that come with widgets are Smash Balloon (to add social media feeds), WooCommerce (to display your eCommerce products), and Envira Gallery (for image galleries).

Can You Use WordPress Widgets in All WordPress Themes?

WordPress widgets are only available in classic WordPress themes. One sign you are using a classic theme is if you see Appearance » Customize on your admin panel, which leads you to the WordPress customizer. You will also see a Widgets option under the same menu.

The Customize and Widgets menu in the WordPress admin panel

If you use a block WordPress theme, then there will be no Widgets item in your WordPress admin menu.

However, you can still add content to your footers, headers, sidebars, and other parts of your theme using the WordPress Full Site Editor.

How to Add Widgets to Your WordPress Site

If you use a classic theme and want to use WordPress widgets, you can go to the Appearance » Widgets page from the admin sidebar. Once you’re there, you’ll see your theme’s widget areas in the main content section.

To see all the available widgets, just click the ‘+ Add Widget’ button on the widget area or on the top-left corner.

As you can see, you will see various types of widgets, such as the text widget, search widget, recent posts widget, and many more.

To add a new widget to the widget area, just click on it or drag and drop it to your desired place.

How to add widgets in WordPress

Each widget comes with its own settings which you can see on the left side when selecting the widget.

For example, if you use the latest posts widget, when you click on it, the widget settings include options to show elements of the posts, order them from newest to oldest, and edit the number of posts to display.

The Latest Posts block widget settings

Once you’re done adding and editing the widgets, click on the ‘Update’ button to make your changes live.

For more detailed instructions, see our complete guide on how to add and use widgets in WordPress.

Can You Create a Custom Widget in WordPress?

Yes, you can create a custom widget in WordPress. However, the process is not very beginner-friendly as it involves editing your functions.php file and some coding knowledge in PHP.

We also recommend backing up your site and/or using a staging environment when creating a custom widget to prevent fatal errors on your site.

For more information, you can read our step-by-step guide on how to create a custom WordPress widget. This article includes a code template for creating a basic WordPress widget.

We hope this article helped you learn more about widgets. You may also want to see our Additional Reading list below for related articles on useful WordPress tips, tricks, and ideas.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Additional Reading

Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit - a collection of WordPress related products and resources that every professional should have!