Customize Your Sidebars with Widget Logic

by Guest on June 19, 2009

So you’ve installed your WordPress theme and made the necessary design changes to it, but you’re not happy that the same sidebar appears on every single page of the blog. You’re not quite sure how to edit the template’s source code and so far you’ve hit a roadblock while trying to research other methods on how to have custom sidebars.

Enter Widget Logic

Widget Logic allows you to determine what sidebar gets featured on what page simply through the use of an extra control field called “widget logic.” How does it accomplish this? Widget Logic lets you to use WP’s Conditional Tags essentially saying that if this statement is “true” then display everything in “this” particular sidebar.

For example, you’ll notice in the image below a section called Widget logic that has the PHP statement “is_page(‘social’). This particular widget logic states that “if the page is called “social” then display everything that’s coded here in this sidebar; otherwise don’t display a sidebar.


Like the average blogger, you probably don’t know any PHP am I right? Well you don’t have to with this plugin!

The developer has taken the extra time to provide you with some of the most commons uses of this “widget logic”. For example, in the image below the developer has provided you with 9 different PHP statements that you could use such as “is_home()” – meaning show this sidebar if this is the homepage.


You can also combine statements to make an even more of a complex statement. An example would be:

“is_page('home') || is_page('menus') || is_page('bbq-classes') || is_page(‘catering-menu') || is_page('food-trays') || is_page('catering') || is_page('bbq-meats')”

In this instance, the statement says that if any of these page names are true then display this particular sidebar. This would allow you to put the same sidebar on each of these pages which is usually helpful when you have a set of pages that are all related.

This is all fine and dandy, but I bet you’re wondering what custom sidebars look like on an actual blog. The image below is an example of a blog (designed with the Thesis theme) using Widget Logic. As you can see, they change the sidebars to showcase different catering plates on their blog.


When you take into account that it’s been downloaded over 15,000 times from WordPress, has an average rating of 4.5 stars and it’s a breeze to download and install, it’s a very useful plugin to have on your side. Especially, if you don’t know any PHP!

You also get the added benefit of the developer providing you with the most common statements that users typically use when using Widget Logic. What more could you want in a plugin? Download it today and see how happy you’ll be with this plugin and your custom sidebars.

Casey Yandle is the Creative Director for Creative Daylight, a corporate identity & internet marketing firm that specializes in search engine optimization, web design and custom wordpress mods.

{ 7 comments… read them below or add one }

Previous post:

Next post: