How to show or hide widgets on certain posts and pages in WordPress

By | November 27, 2015

Display selected widgets only

At times certain widgets need to be hidden from or shown on selected pages or posts only. For example you might want to remove a sidebar advertisement from “About Us” page.

So in this post we are going to talk about some plugins that provide users with the ability to selectively show or hide widgets on specific pages or posts.

1. Widget Logic

It adds a code box (text field) in each widget where you have to specify the condition for displaying the widget using php code. This is quite simple if you know php and need to implement few simple conditions.

https://wordpress.org/plugins/widget-logic/

2. Display Widgets

It adds a set of configuration options in each widget box, where you can specify to either hide or show the widget in a given set of pages or posts specified by id.

https://wordpress.org/plugins/display-widgets/

3. Widget Context

Widget Context is another plugin similar to Display Widgets and allows to show or hide widgets on selected areas like pages, posts, archives or categories. It allows to target specific pages using the url.

https://wordpress.org/plugins/widget-context/

4. Restrict Widgets

The Restrict Widgets plugin is similar to Widget Context and Display widgets. It allows user to select pages, category of posts or even device types to show or hide the selected widget.

https://wordpress.org/plugins/restrict-widgets/

5. Dynamic Widgets

The Dynamic Widgets plugin is similar to the above widgets in a way, that it allows users to specify display criteria for individual widgets. However it supports a vast list of options when it comes to specifying the criterias.

In addition to pages and posts, Dynamic Widgets can also controls visibility of widgets based on browser, device type, ip address, dates, user roles and author.

https://wordpress.org/plugins/dynamic-widgets/

6. WP Page Widget

WP Page Widget takes a different approach to control widget visibility. It allows you to specify widgets for every single post or page right inside the editor area.

This is useful when you need a very high level of precision at individual post/page level to select the widgets to display.

https://wordpress.org/plugins/wp-page-widget/

Download SeoStack

7 thoughts on “How to show or hide widgets on certain posts and pages in WordPress

  1. Nina

    Hello, is there a plugin to show/hide a specific widget for Product Categories? Everything I’ve tried only works on blog-type posts, but not WooCommerce product categories. I have special promos that have to show up for certain sports – it’s an ad for softball helmets, so it wouldn’t make sense to have show up in every sport.

    Reply
  2. Umar Tanveer

    Thank you! I was looking for these plugins. Really helpful

    Reply

Leave a Reply

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