How to… use 1 widget in various WordPress Sidebars

Widget-enabled themes are a good thing, Martha Stewart would probably say – and rightfully so. Configuring one's sidebar directly via CMS and drag-and-drop is doubtlessly a nifty feature we bloggers don't want to miss. To kick things up a notch, WordPress allows for an infinite number of different Sidebars. This comes in very handy for putting different sidebar contents on the blog homepage, the single postings and the static pages. But most bloggers who start experimenting with multiple sidebars experience a major draw-back: most plugins can only be used in one sidebar exclusively.

This means that if you have different sidebars for your homepage and your single posts, you cannot for example include the tag cloud widget in both sidebars. (more info: How set up multiple sidebars) But worry not, of course there is a very handy plug-in which solves this problem: Duplicate Sidebar Widgets does what its name implies: it enables you to make up to 25 copies of any widgets, therefore being able to use the same one in up to 25 sidebars. (You probably won't need that many, though.) btw: just in case anything goes badly wrong, you can always delete your widget-copies later. This solution works for most widgets, but some complex scripts simply refuse this treatment. (Top Commentators is one of those.)

But luckily, there's Samsarin PHP Widget. While the standard text-widget may only contain HTML but no php, the Samsarin Widget will gladly accept php input. So basically the first step is to copy the php-widget using the aforementioned Duplicate Widget Plugin, and in the second step you have to enter the desired php-function-call manually. This does not just sound like a bit of work and readme-digging, it actually is – but using this method gives you total flexibility in designing your widgetized sidebars.

9 replies
  1. assurance
    assurance says:

    wow.. :)

    i have searched for this kind of how to for a long time when i was building my wordpress blog, but your article didn’t exist at this time..

    anyway, i keep the url and i’ll come here next time i need it :)

    thx !

  2. ritchie
    ritchie says:

    But be aware that this method is not necessary any more; current WordPress versions support this multiple-widget functionality out-of-the-box.

Comments are closed.