WordPress GuideWidgets → Hide All Widgets

How to hide (or show) all widgets on a specific page in WordPress

WordPress widgets don’t have built-in visibility rules. But with the right tools, you can control exactly where they appear—without breaking your theme or writing much code.

Let’s walk through multiple ways to hide or show widgets on specific WordPress pages, from beginner-friendly plugins to advanced theme edits.

Using a plugin to control widget visibility

Plugins offer the simplest and safest way to manage widget display by page, post, or user condition—no code required.

1. Install a plugin like Widget Logic or Block Visibility

Start by adding a plugin that lets you apply conditional rules to widgets:

Both plugins give you page-level control over widget display, but they work a little differently.

2. Add widget conditions using Widget Logic

For classic widgets (Appearance > Widgets), Widget Logic adds a field to each widget for conditional logic:

You can use WordPress conditional tags for more advanced control.

3. Use Block Visibility for Gutenberg widget areas

If you’re using a block-based theme or the Site Editor, Block Visibility is your best option.

This works great for full-site editing themes where widgets are added directly in block areas.

4. Save and test your settings

After applying visibility rules, preview your pages to confirm widgets are showing or hiding as expected.

Modifying theme files for advanced control

If you’re comfortable editing PHP, you can control widget display by modifying your theme’s sidebar template.

1. Locate your sidebar template

You’ll usually find this file in your theme folder:

2. Add conditional logic to show or hide the sidebar

Here’s how to hide all widgets on a page with the slug contact:

Here’s how to hide all widgets on a page with the slug contact:

This logic prevents the entire widget area from loading on that page.

3. Save and preview

After saving changes, reload your site to make sure the sidebar disappears only on the page you’ve targeted.

Other plugin options for widget visibility

Widget Logic isn’t your only choice. These plugins offer different approaches to page-based widget display.

Widget Options

Content Aware Sidebars

How to hide all widgets but keep the sidebar layout

Sometimes you want to keep the sidebar layout for design consistency—but not display any widgets inside it.

1. Register an empty sidebar

In functions.php, add:
register_sidebar(array(
  ‘name’ => ‘Empty Sidebar’,
  ‘id’ => ’empty-sidebar’,
));

2. Swap sidebars conditionally

In sidebar.php:
<?php
if ( is_page(‘contact’) ) {
    dynamic_sidebar(’empty-sidebar’);
} else {
    dynamic_sidebar(‘sidebar-1’);
}
?>

Next steps for hiding or showing WordPress widgets

Controlling widget visibility on a per-page basis is one of the easiest ways to customize your WordPress site’s layout and UX. Plugins like Widget Logic and Block Visibility offer simple options for most users, while theme edits unlock even more flexibility.

Pick the method that fits your site setup and skill level. Want full control over visibility conditions? Try Widget Logic. Using the Site Editor? Go with Block Visibility.

Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.

Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.

Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.

Ready to get started?

Get the fastest, most secure WordPress.org hosting on the market.

Additional resources

What is WordPress? →

A complete beginner’s guide to basic WordPress options

WordPress widgets: How to add and use them →

Explore how WordPress widgets enhance site functionality by adding customizable features to your sidebar or footer.





A complete guide to WordPress shortcodes →

Shortcodes make life easier. Learn how to get started!

Kiki Sheldon works as a Security Specialist for Liquid Web with extensive knowledge of popular Content Management Systems (CMSs). She keeps up with technology and always looks to improve her technical skills. In her free time, she enjoys reading, especially classic books and detective stories.