How to Have Different Sidebar Content On Different Pages of Your WordPress Site

In: WordPress Plugins| WordPress Tutorials - Basic

how to have different sidebar content on different pages of your wordpress site

Many WordPress themes do not yet provide a way to have totally different sidebar content on different pages of your site. Some may provide a little flexibility with, for example a sidebar for the blog and a different sidebar for static pages, but sometimes you need more comprehensive control – for example you may need an additional set of navigation on a certain set of sub-pages. There’s several different plugins that help you gain this type of flexibility with your site.

Display Widgets

The Display Widgets plugin is perhaps the simplest and most user-friendly option. After activating the plugin you will notice that when you add a widget to your sidebar, there is a system of checkboxes whereby you can easily tell the widget to show up, or not to show up on certain pages/posts or types of pages/posts. In addition you can choose to display a widget based on whether a user is logged in or not, which would be handy if you have any kind of membership site or protected content pages. This plugin is easy enough for beginners to use!

Using Display Widgets WordPress PluginUsing Display Widgets WordPress Plugin

 

Dynamic Widgets

Using Dynamic Widgets WordPress PluginThe Dynamic Widgets plugin does a very similar job to Display Widgets, but  adds a couple of extra controls for widgets which you may find useful. The interface is perhaps not as immediately easy to use as Display Widgets, becuase it actually takes you to a separate page to control the settings for each widget, but the extra features, provided by checkboxes are:

  • Display widget according to the user’s role, including any custom roles you have created
  • Display according to date – this could be really handy if you want to run a promotion of some kind – you can specify the dates a widget can be shown
  • Display according to browser – not sure how you might use this (other than telling people on Internet Explorer 6 to upgrade…) but it sure is cool!

Widget Logic Plugin

This was one of the original plugins I used for controlling widgets and I’m including it in the list for more advanced users who don’t want to deal with checkboxes and are comfortable with WordPress conditional tags. This plugin adds a simple field to each widget which requires you use a conditional tag to control where the widget displays.  It’s not too hard once you understand it, but definitely not user-friendly off the bat.

For example, to make the widget show up only on single post pages, you would enter the tag:  is_single()

To make it show up on a specific post or page you need the ID number of the page which is not readily available on any admin screen. You need to actually look in the url when editing a post/page to look for the id number. Or you can install this handy plugin called Reveal IDs which will conveniently show the IDs in a column inside the admin area. So you identify a page/post that you want a widget to display on, locate the ID and use the following tag:  is_single( ’106′ )
where 106 is the ID of that page/post.

You can do all sorts of combinations to test for things like sub-pages etc. Anything you can do with a conditional tag, you can apply to a widget.

These three plugins so far have given you control over where and how individual widgets show up in the existing sidebars your theme already provides. So this means that when in your Widgets screen, you’ll see a sidebar are with several widgets inside, some of which show throughout the site, and some that show only on certain pages. There’s nothing wrong with this set up, although if you have a lot of widgets it could be confusing to keep things organized and to determine at a glance which widget is going to show up in which sidebar.

So another approach is to use a plugin that enables you to create entirely new sidebar areas that appear on your Widgets screen.

Custom Sidebars Plugin

With this plugin you can create new sidebars to use in your theme and you can then designate which sidebar shows up on which page. The interface is not particularly user-friendly, but once you get how it works, it does do the job nicely. It’s a 4-step process.

  1. You have to specify which of your current sidebars are “replaceable”. This means you can choose to replace one of your theme’s default sidebars with a custom one.
  2. After you have selected one that can be replaced, you can then make a new sidebar.
  3. Now when you are on your page editing screen you’ll have a box and drop down where you can specify which sidebar will show up on that page.
  4. You add widgets to that particular sidebar on the Appearance > Widgets screen as usual.
Custom Sidebars Plugin
Custom Sidebars Plugin

So now when you go to your Widgets screen you will see a dedicated area for the new sidebar you have created:

Custom Sidebars Plugin

Per Page Sidebars Plugin

This plugin does the same job as custom sidebars but has a little better workflow. On your page editing screen you will now see a box where you can enable a custom sidebar for that page, and choose which of your current sidebars you would replace.After you make your selection and save the page, when you head over to the widgets screen you’ll see a new widget area labelled with your page name.

Both plugins seem to work equally fine – the only difference would be your preference for which workflow you prefer.

 


I hope you found this post useful. If you enjoyed it, consider signing up for updates via email. I help entrepreneurs and businesses learn how to use WordPress - with patience and hand-holding, I turn technophobes into technopros. I also help businesses develop an effective online marketing strategy and compelling web presence.

4 Responses to How to Have Different Sidebar Content On Different Pages of Your WordPress Site

Avatar

Ann Marie Gill

April 25th, 2012 at 11:52 pm

I hadn't heard about Display Widgets – good one. I have been using the unsupported Slayer Widget for my sidebars which works pretty well but has been removed from the WP plugin depository. I tried Dynamic Widgets but it caused conflicts with editing other widgets. Thanks for the list. This is such an important feature to have that I hope future versions of WP include different sidebars. Looking forward to meeting you at Wordcamp! Like your blog – my first visit!

Avatar

LucyBeer

April 26th, 2012 at 7:57 am

Hey there – thanks for checking out my blog! Display Widgets will definitely make your life easier and it\’s straightforward enough that your clients can manage it as well. Definitely come say \”hi\” at WordCamp!

Avatar

Jose Velasquez

October 2nd, 2012 at 6:03 am

Your comments have been very helpful but I was looking for a tutorial where you can choose a sidebar for specific category. For example if you choose a category I like to see a specific sidebar for that category and so on. Do you have any idea??? I would appreciate any help or information that you can provide.
Cheers,

Jose Velasquez

Avatar

LucyBeer

October 2nd, 2012 at 9:28 am

Hi Jose
You can do this with the plugin I refer to called "Custom Sidebars". In the plugin you can create a sidebar and assign it to be used for a specific category.

Comment Form

Weekly WordPress Tips

+ Discounts on Classes & Products

How I Can Help You

Hi! I'm Lucy Beer. I believe that technology is liberating when you know how to use it, and bewildering when you don’t. That’s where I come in. I help non-techies understand and use the web to empower their personal or business mission. I'm here to share with you everything I've learned (and continue to learn) about WordPress and online marketing. Whether you need to build a website, optimize your existing site, or create a marketing strategy that works, I'll help you understand, in plain English, what you need to do to achieve your goals.

Upcoming WordPress Classes

IN-PERSON CLASSES

Ecommerce with WordPress: Sell Products and Services
May 29th, 7:30pm - 9:30pm
$40

Learn How To Get Targeted Traffic To Your Site

Let’s Talk On Facebook

Socialize

Services I Use & Recommend

Sucuri
WP Engine
BlueHost
Gravity Forms
Siteground Hosting
WPMU
  • @DonnaFontenot: I'd love to win this! I do a lot of WP sites for tiny businesses who can't afford much, so [...]
  • Jason: I'm about to launch my internet campaign for my business in a month and I would like to let you [...]
  • @ForkKnifeSpoon: Thanks for posting this! I recently decided hootsuite was not for me and the brands I managed after [...]
  • LucyBeer: The testimonials plugin I reference here has ways you can organize testimonials. For example you cou [...]
  • Alan Little: Hey Lucy, posting testimonials for a site generally seems easy enough, but how to gather testimonia [...]

Login Status

You are not currently logged in.






» Register
» Lost your Password?

May 29th Class : Ecommerce with WordPress - Sell Products & Services REGISTER NOW

Hosted by WPEngine