Oftentimes, WordPress widgets are kind of fluff – fun little extras you can use, but that don’t add a lot of value to your website. This is especially true if you’re using a theme with a single sidebar. When you’re locked into one widget area for all of your pages, have to pick and choose what content is displayed, which widgets look and work best, and what is going to be of the most value to you and your visitors. In fact, many modern themes are foregoing sidebars entirely, because they’ve become a place for generic, recycled content that distracts from the main focus of your posts and pages.
However, if used correctly, sidebars and widgets can be powerful tools. Contextual (content-aware) sidebars and widgets can display relevant content, adding valuable information to your pages and posts. Opt-ins, links, related content, and more, can all be turned on and off on a per-page, per-post, or per-category basis, allowing you to build dynamic, relevant sidebars. No more picking and choosing what’s important globally – each page can display the widgets that make sense for it.
And you can do this all for free, without touching a single line of code.
To make this work, you’ll need to download two plugins: JP Widget Visibility, and Custom Sidebars. (Note: If you’re already using JetPack, don’t you don’t need to download JP Widget Visibility.) Both of these plugins are free in the WordPress Plugin Directory, and work with 99% of themes.
JP Widget Visibility
This is easily one of my favorite plugins. It takes the Widget Visibility module out of Jetpack, and places it in a lightweight, standalone plugin. Widget Visibility gives you fine-tuned control over where widgets appear on your website.
It’s fairly straightforward to use, too. Simply navigate to Appearance > Widgets, select the widget you’d like to add visibility settings to, and click the Visibility button. From there, you’ll get a box with options to show or hide your widget when a post or page matches the criteria you set. Using the Add or Delete links, you can add or remove criteria, giving you granular control over where a widget is displayed.
Sometimes, Widget Visibility is enough. Other times, you need more control. For example, perhaps instead of just dictating widget placement, you need to control groups of widgets. You could set the visibility to all the widgets individually, but that would take forever. In these cases, creating whole new, content-aware sidebars is my preferred widget-management method. And Custom Sidebars is the ideal tool for the job.
When you install Custom Sidebars and navigate to Appearance > Widgets, you’ll see a new panel on the right side. On the right half, you’ll see all the sidebar areas your theme comes with. On the left, you’ll see a new column, which will list all of your custom sidebars.
To create a custom sidebar, just click the Create a new sidebar button, give your sidebar a name and a description, and click Create Sidebar. It will pop into the left column, and you can add widgets to it. Easy as pie.
Controlling where your sidebar is displayed is easy, too. For posts and pages, the plugin adds a meta box right on the Edit Page screen – you can select your custom sidebar from the dropdown, and it will show up when you save the page. If you want to display your sidebar globally (for example, on all blogs in a category), you click Sidebar Location, select the sidebar you want to replace (out of the list on the right) and the criteria for replacement. Simple!
The Best Part?
These two plugins are completely compatible with one another, meaning you can have complete control over your widgets on almost any theme. In fact, I’ve used them together in my work – helping clients display relevant product links on a per-category basis, or swapping out the opt-in offer depending on the article that’s being read.
Together, they’re a great way to keep your sidebar relevant and valuable to both you, and your visitors.