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.
9 thoughts on “About the visibility setting on WordPress widgets”
Thanks for the ‘show & tell’. Actually I had seen the button and even clicked on it once but what I was seeing made little sense and besides, the widget was working as I expected so my interest wasn’t swayed at the time. It is good to know however that we have the option to be more selective about where we might want to use one or more widgets. 🙂
I’d clicked on the button too and poked around in the various settings but I just never comprehended the use or potential. I probably never would have if this theme hadn’t offered that full width option that I really wanted to employ.
So, let’s see if I got this right: If, for example, I’d like to set up a page with all of the posts about minerals, I can create a widget that will appear only on those posts that has “minerals” in the category and when a reader clicks on that widget, she will be taken to an entire list of those mineral posts.
You don’t need to set up a page with all your mineral posts. That’s a category archive page and it’s generated automatically. It’s what you see when you click on any of your categories. All I did was add a link to an archive page.
Of course, your readers can just click on the minerals category if they want to see the all the minerals posts on the archives page. But you could use a widget to draw special attention to it.
Very good to know! Thanks for the tutoring!
I did not know about the visibility setting, now I do, will check that out. Thanks. Just came by to thank you for the “Like” of my Hello page, which has been in the middle of revision for about a month! Hopefully it and my draft posts will get done in the next few weeks!!
I reread this post recently and parts of it didn’t even make sense to me anymore. I’m glad you found something useful in it.
I’m constantly revising my “About” page. But I’m never completely satisfied with a post. Seems like I’m not happy if I can’t find something to edit.
I didn’t know about the visibility setting, I’m going to look into it for my blog – I might be able to use it to introduce each category – something to else to play with. Thanks.