Get all themes with lifetime updates for 95 USD. View all promotions

How to show WordPress widgets on select pages only

Have you ever wondered how to show WordPress widgets on select pages only and not others? Unfortunately WordPress does not have this capability, which makes you wonder why? You would think that this would be considered important when building a website, but obviously they don’t feel the same.


The Problem With WordPress Widgets

Ever since I started using WordPress, there was something that boggled my mind. For some crazy reason, WordPress refuses to add the ability to show or hide widgets on specific pages. I remember asking them why this was not a function built-into WordPress. Their answer was to simply use a plugin! Not the answer I was looking for and to this day, they still have not given an honest reason.

WordPress widgets are used every day by millions of WordPress users, so it only makes sense that I show you how this is done. Drag a widget into a sidebar position, you will notice there is no option or setting let’s you choose what page or post to show (or hide) it on. Just as it was said to me, your only option is to use a plugin; so that is what we will use.


Plugin Options

There are several plugins we can use to show or hide our widgets, with each one having pro’s and con’s, so I will take you through the plugins I’ve used.


Widget Logic

Widget Logic is not that bad and does offer the basics of what you need to show or hide WordPress widgets, but you need WP Conditionals to make it work. If you want to use this plugin, I recommend you bookmark the WP Conditionals page for reference.

Widget Logic

Basically how this works is that you type in a conditional like you see in the above screenshot. widget logic example If you wanted this widget to show on all pages, you would use is_page() as the conditional. However, if you wanted it to show on just the Contact page, you would type in is_page(‘contact’) or use the page ID as is_page(’23’) as the conditional.


Widget Options

This is a full featured option called Widget Options:

Widget Options

I actually use this on many demo sites now because of its features. It comes in free and paid versions, but you can do a lot with the free one. It’s probably the most flexible and it’s also a plugin that gets updated often. Like other options, all your settings are added to the bottom of each widget.


JP Widget Visibility and Widget Visibility Without Jetpack

I’ve decided to combine these two plugins because they are similar to each other and both are based on the Widget Visibility module in Jetpack. widget visibility without jetpack plugin jp widget visibility plugin I actually use the JP Widget Visibility plugin for my WordPress theme demo sites which seems to work just fine even though on the WordPress plugin’s directory, we get this notice: plugin not updated notice Regardless of the notice, it still works just fine, but for how long down the road, it’s hard to say. However, to use it, you don’t need WP Conditionals, you simply click on the “Visibility” button at the bottom of the widget. This shows a hidden panel with three drop-down settings to choose how and where to show or hide the widget. jp widget visibility 1 For the Widget Visibility Without Jetpack plugin, it’s very similar in functionality with the exception it adds the option to include the “children” of where you are showing or hiding the widget: widget visibility without jetpack 1


Widget Visibility – Jetpack

Seriously overkill if you just need to use their Widget Visibility module, but if you are using Jetpack already, you don’t need any other plugin. The Widget Visibility module does exactly what the other two do, but the difference is that you are using the module direct from the creators. widget visibility jetpack


Using Widget Visibility

It’s really strange what Automattic had done with Jetpack previously, but to enable the Widget Visibility module, you have to find it! In our opinion, Widget Visibility should be enabled by default and be a part of WordPress, not Jetpack.

Updated, newer instructions: It is now easier to find it. In Jetpack settings, go to the writing tab, scroll down to the Widgets section, and Enable widget visibility controls. Continue below.

Older instructions: Go to the Jetpack settings and then at the bottom of the page is a Debug link that you need to click on. jetpack debug From there, you will get a screen with lots of messages. Look for the “Access the full list of Jetpack modules….” hidden on the page and click it. jetpack access hidden features Now you can find Widget Visibility on the list and as you hover over it, click on the “Activate” link and then you are done! jetpack enable widget visibility Whether you have followed the newer or older instructions, continue from here.

This will add a Widget “Visibility” button to the bottom of every widget. jetpack widget visibility options


Other Options for WordPress Widgets

Unfortunately, there is no easy method to manage where your widgets are shown, nor is there really any development to make widgets easier to use period! Aside from the above options, there are a few others, but I was not a fan.The idea is to find a plugin that requires the least amount of work, but so far, the above seems to fall into that category—the exception being Widget Logic.

Please let me know in the comments or through my Twitter and Facebook pages if there are additional (quality) choices.

Write a Comment

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