Control the visibility of your widgets.
If you missed the announcement of our widget visibility feature over on en.blog.wordpress.com, we wanted to let you know you’ve got a handy new tool in the widgets section to control the visibility of each widget. You can show or hide a widget based on rules you set.
Want to see how it works and learn to use it creatively? Head to Appearance » Widgets in your dashboard and we’ll get started!
You can test this on one of your currently displayed widgets, or drag and activate a new widget from the left to the right. When you open the widget, you’ll notice a new module at the bottom:
In the first drop-down menu, you can opt to show or hide that particular widget depending on rules you specify in the field(s) underneath. For example, if you want your Archives Widget to only appear on error and category archives pages, choose Show from the first drop-down menu, and then add two rules: Page is 404 Error Page and Category is All Category Pages. (You can add additional fields in the module by clicking the + link on the right.)
Normally, the widget will be shown (or hidden) if any of the fields apply. With the checkbox at the bottom, you can instead show (or hide) the widget if all of the fields apply.
As you can see in the drop-down options, visibility is controlled by five aspects: page type, category, tag, date, and author.
This feature is a simple way to control what content you’d like your visitors to see, and you can change the look of your sidebar (and site) depending on what a reader is currently viewing. Let’s say you don’t want your readers to see your About.me Widget, or your custom Text Widget with your bio and thumbnail, while they’re viewing your About page (which may look repetitive). In the widget’s settings, choose Hide and add Page is About, like this:
You can make a variety of tweaks using the visibility feature. A few more ideas:
- Hide your Flickr Widget on posts tagged with “photography” if you don’t want Flickr image thumbnails displayed when visitors are viewing a photo-heavy post. (There is such a thing as image overload!) (Select Hide and add Tag is Photography.)
- If you have a group blog, show the Twitter Widget of the appropriate contributor on posts tagged with that author. (Select Show and add Author is [Contributor’s Name].)
- If you’re an author, hide the custom Image Widgets linking to your books on your “Books” page to avoid duplicate information. (Select Hide and add Page is Books.)
- Hide the widget displaying your blogroll on a “Favorites” page, which may also be full of links. (Select Hide and add Page is Favorites.)
How will *you* use the widget visibility feature? Let us know in the comments.