How to Show or Hide Any WordPress Widget on Certain Pages

Show or hide WordPress widgets on certain pages

Not every widget belongs on every page. You might want a “Recent Posts” widget everywhere except the homepage (which already lists your posts), an affiliate banner only on reviews, or a signup form hidden from people who are already logged in. WordPress does not offer this out of the box, but a free plugin makes it easy.

Updated October 2026: the two plugins from the original guide, Display Widgets and Widget Logic, have been removed from WordPress.org. Here are the current options.

Option 1: Widget Options (Widgets and Blocks)

Widget Options (100,000+ active installs) adds visibility settings to classic widgets and to blocks in the block editor:

  1. Install and activate Widget Options. (How to install a plugin.)
  2. Go to Appearance > Widgets (or open any block’s settings in the editor).
  3. Open the widget or block and find the visibility options.
  4. Choose where it should show or hide: homepage, posts, pages, specific categories, post types, devices, or logged-in status.
  5. Save.

For example, to hide a widget on the homepage, choose Hide on checked pages and tick Home/Front.

Option 2: Block Visibility (Block Themes and the Block Editor)

If you use a block theme or build sidebars with blocks, Block Visibility adds a Visibility panel to every block. You can hide blocks by user role, screen size, date and time, query string, and more (some conditions are in the Pro version).

Option 3: Jetpack Widget Visibility

If you already use Jetpack, its Widget Visibility feature adds a Visibility button to classic widgets so you can show or hide them by page, category, tag, author, or user role, with no extra plugin.

Useful Ideas

  • Hide recent posts on the homepage.
  • Show an affiliate banner only in a specific category.
  • Show different signup offers in different categories.
  • Hide large widgets on mobile to speed up pages.
  • Show a “Start Here” widget only to logged-out visitors.

Need IDs for specific posts or categories? See how to find post and category IDs. For more sidebar ideas, read the types of widgets to add to your sidebar.

Frequently Asked Questions

Can I hide a widget on one specific post?

Yes. Widget Options and Jetpack let you target individual posts or pages, usually by selecting them or entering their IDs.

Does hiding widgets speed up my site?

Hidden widgets are usually not loaded on those pages, so hiding heavy widgets can help a little.

Do these plugins work with block themes?

Block Visibility and Widget Options both support blocks. Jetpack Widget Visibility works with classic widgets.

Comments

2 responses to “How to Show or Hide Any WordPress Widget on Certain Pages”

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Jeffrey Avatar
    Jeffrey

    Hi Istiak,

    Display Widgets has been missing on the repository.

    I highly recommend Widget Options for replacement – https://wordpress.org/plugins/widget-options/ which is also available for free on the repository. I wish you can update the article using this one instead. Thank you very much!

  2. Ahsan Avatar
    Ahsan

    I already used Display Widgets to hide different widgets from a certain page. But sometime it doesn’t work appropriately. I’ll try another plugin – Widget Logic. seems it is better than previous one.

    Happy blogging