WordPress widgets are pretty handy when you want to add functionality or information to your blog. And they share one particularly nifty function that I really didn’t understand until recently. The visibility setting. (Feel free to move along if you already understand the visibility setting. I won’t hold it against you.)
I read about the setting when it was first introduced and explained, but nothing registered. I didn’t understand how it worked or when or why I would use it. But something finally clicked recently. A light came on. (Better late than never.) Aha! With the visibility settings you can set a widget to appear only with the posts or pages that you specify. And I realized there was something I could do with that.
I set up a widget* about the war on women and it appears only with posts I’ve filed under the categories “war on women” and “abortion.” Notice you don’t see it in the sidebar now. It would be distracting and not at all relevant to a post about WordPress. But click over to the post about the Supreme Court’s Hobby Lobby decision, and voila!
To do something similar, first, select a widget and move it to the desired position in a sidebar. For this one I used an Image widget. Set up the widget title, contents, etc., and then click on the “Visibility” tab at the bottom. I wanted my widget to “Show” when a post’s “Category” is “war on women,” so I selected those items in the appropriate boxes. Then I clicked “Add” and repeated the process to add the category “abortion.” Finally, I clicked “Save.”
My finished widget, which I decided to link to my “war on women” category page, looks like this:
I might just as easily have linked it to the Planned Parenthood action site, or an online petition. Or nothing. The possibilities are endless.
What about the “Hide” setting? I also found a use for it. You may have noticed that with some of my posts there is no sidebar (yesterday’s Fourth of July post, for example); the post fills the entire width of the page. That’s achieved by setting all my sidebar widgets to “Hide” when the category is either “photography” or “wide-format.” Note, however, that only certain themes are designed to expand to full width. In other situations you’d simply have a widget that disappears when certain categories, tags, dates, authors, etc., appear.
I have a few other ideas for using the Visibility setting. Once I understood how it works, the wheels started turning. For example, I might revive my Flickr widget with the Rocky Mountain National Park photos and have it show on posts about the park. Or I could set up a slideshow widget to do the same thing, for the park or other topics. Or design a holiday greetings widget to show just during the Christmas holidays. Or set up a widget with details on the local weather, for when I’m talking about a storm in Denver. When I was reporting on Colorado’s fires and floods, I could have had widgets with links to the latest updates on those. To me, with my journalism background, it seems a bit like ad placement, where ads are placed in close proximity to related topics and kept away from conflicting content.
How about you? Have you used the Visibility setting, or do you have an idea for using it? Care to share?
_______________
*Update 9/2/14: As part of some design modifications, this widget has been removed.