How to display widgets on select pages only

I’m sure many have encountered this problem…you are building a website using WordPress, drag a widget into a sidebar, add your content, and then you noticed that every single page in your website that has that sidebar is now showing the widget everywhere. Frustrating at best, especially if you want to show it only on a few pages, but not all pages.

By default, WordPress shows a widget everywhere a sidebar exists but leaves no method to choose what pages. To do this, you need to use a third party plugin to add that functionality, but not all plugins are equal as there are several that you can use.

What Are Your Options?

You have several options, but as I just mentioned, I will show you two plugins that can acheive the result you want without having a steep learning curve, but lets begin with a short list of options:

  • Theme Functionality – Some themes may have this function built into it, and in some cases, works quite well. However, what good is this option if you later change your theme to a different one? Exactly! You will lose everything and must start over. So we will scratch this one off the list.
  • Conditional Widgets – Some plugin based widgets are available with this built in, but I find these are limited because it only applies to that specific widget (s). So scratch these off the list too!
  • Widget Logic – A nice plugin, and granted I have used it in the past. However, you need to refer to WordPress documentation for conditionals that you use. This plugin adds a conditional set of options at the bottom of most widgets, default and third party, but still means you have to refer to WordPress conditional tags documentation. We’re almost there, but I would list this one as a runner up.
  • Jetpack – A massive collage of modules, this plugin by Automattic includes one called Widget Visibility. This adds a set of options at the bottom of every widget and there’s no need to reference conditional tags because the settings you get give you the ability to simply require a few mouse clicks.
  • Display Widgets – This is an awesome alternative to the Jetpack option and is strictly a standalone plugin that functions only for displaying widgets on select pages. My latest theme demos use this and it works perfect.

How to make your choice

This will be your own personal preference, but it will also depend on what you are using…if anything. If you’re not using Jetpack, I would recommend using the Display Widgets plugin because it offers a much easier method to manage your widgets, compared to the other options (with excerption to Jetpack). However, one thing you can do is to try each method and explore which one works best for you. If you decide to try each one, do this on a test site (development location) so you can play with each one as long as you need and not worrying about messing up your website.

My Opinion

With most of my themes, I generally talk about how to show your widgets on select pages, but the method I use the most is the Display Widgets plugin by Steph Wells. Unless you are using Jetpack, I would recommend this plugin as the better solution.

Leave a Reply

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