Quite a few years back a WordPress plugin was released called Widget Logic. The plugin has been downloaded nearly a quarter of a million times to date. The premise is simple, it allows you to restrict the view of any widget to specific pages using WordPress conditional tags. By default a widget on a WordPress website gets displayed on all pages sitewide (and there’s no way to change that without some custom WordPress PHP code in your theme).
This image shows how the original Widget logic plugin worked – which solved that problem (to a degree). It presented an input box at the bottom of widgets where you could enter conditional tag code. The only issue is – if you don’t know code, this could be a little difficult for the average person (that’s not technical or doesn’t know WordPress template coding).
Total Bounty™ loves to give back to the community, and we have decided to sponsor development of a new plugin based on the original concept for Widget Logic – only for everyone (including non-technical people).
We have released “Widget Logic Visual” to allow non-technical non-coding users the same capabilities. With more than 70 million websites running WordPress – we know for a fact that vast majority aren’t technical, and aren’t coders (from experience). The plugin (once installed) has no settings page, but shows a new button at the bottom of all widgets “edit visibility”. Just click on that button to get options for that widget (if you do nothing it still displays sitewide).
Once you click the “edit visibility” you get a lightbox popup like this. Just click “Add New Visibility” to restrict where that widget appears on your website (click image below for full size).
In this image we show adding a limitation for all category pages. If we checked “except”, the widget would show on all pages of the website except category pages.
In the image below we show what happens when you uncheck the “all” box. You get a multi-select box and you can choose any single or multiple category pages. The same thing happens when you uncheck “all” for tag, author, attachment, posts, and paged pages.
You can add as many visibilities as you’d like, and you can easily edit any of them once added. You can choose to add “visual” widget limitations (without knowing any code), or you can use wordpress template conditional tags (for advanced users). You can use one or the other (per widget) but not both.
In this example we show adding a conditional tag for the is_home() conditional tag. You have to check the “activate the code” box before clicking “update”. This is so later you can come back and uncheck and deactivate the code if you need to try a visual limitation instead (and the code will still be in this box if you want to come back and try or edit the conditional tag again). Just remember – you can have either conditional tag code, or just visual limitations (per widget), but not both.
In this image we see the error that you’ll receive if you try to add both a visual limitation and conditional tag code:
Widget Logic Visual Video Tutorial
Here’s a quick video on how the Widget Logic Visual plugin by Total Bounty works (*please note this video is for version 1.4, a new video is in process of being created for the new features of 1.5)
If you have questions about the plugin you can discuss it in the Total Bounty forums.
Widget Logic Visual is available in the official plugin repository here or you can install it within your WordPress website by going to “Plugins->Add New” and searching for “widget logic visual”. Then just install and activate the plugin.