◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Widgets → 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:
- Go to Plugins > Add New in your WordPress dashboard.
- Search for Widget Logic or Block Visibility.
- Click Install Now, then Activate.
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:
- Open Appearance > Widgets.
- Click on the widget you want to control.
- In the Widget Logic field, enter a condition like:
- !is_page(‘contact’) – hides the widget on the contact page.
- is_page(‘about’) – shows the widget only on the about page.
- !is_page(‘contact’) – hides the widget on the contact page.
- Click Save and preview your page.
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.
- Activate Block Visibility from your plugin list.
- Open the block editor on any page or template.
- Click on a widget or content block.
- In the block settings sidebar, expand the Visibility panel.
- Choose visibility options based on:
- Specific pages
- Post types
- Logged-in status
- Device (mobile/desktop)
- Specific pages
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:
- Go to Appearance > Theme File Editor, or use FTP
- Open sidebar.php or sidebar-[name].php
2. Add conditional logic to show or hide the sidebar
Here’s how to hide all widgets on a page with the slug contact:
<?php
if ( is_page('contact') ) {
// Don't display sidebar on this page
} else {
?>
<aside id="secondary" class="widget-area">
<?php dynamic_sidebar('sidebar-1'); ?>
</aside>
<?php } ?>Here’s how to hide all widgets on a page with the slug contact:
- Open Appearance > Widgets.
- Click on the widget you want to control.
- In the Widget Logic field, enter a condition like:
- !is_page(‘contact’) – hides the widget on the contact page.
- is_page(‘about’) – shows the widget only on the about page.
- !is_page(‘contact’) – hides the widget on the contact page.
- Click Save and preview your page.
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
- Adds visibility settings right inside the widget editor.
- Control visibility by post type, taxonomy, device, user role, and more.
- Easy interface—no code required.
Content Aware Sidebars
- Lets you create new sidebar areas and assign them to specific pages.
- Useful when you want different widget sets per page or post type.
- Supports conditions like category, tag, template, or user role.
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.
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.