• I have 2 sidebars working and am using widgets for both.

    The problem is that if I add a widget to one sidebar, I can no longer add that same widget to my second sidebar.

    Is there anyway to be able to add individual widgets to both sidebars?

Viewing 5 replies - 1 through 5 (of 5 total)
  • * bump *

    I have this same issue. If you have two different page templates for the same site, and some of the pages share the same widgets, this issue becomes critical.

    I wrote up a post on how to create extra copies of widgets for multiple sidebars. The trick is to edit the line of code that registers the widget. For example, I wanted to make duplicates of the Creative Commons License widget, so in the file /wp-content/plugins/wpLicense/widget.php I found the line which registers the widget with the system.

    register_sidebar_widget(array(‘Content License’, ‘widgets’), ‘widget_cc’);`

    and changed it to be four lines

    register_sidebar_widget(array(‘Content License 1’, ‘widgets’), ‘widget_cc’);
    register_sidebar_widget(array(‘Content License 2’, ‘widgets’), ‘widget_cc’);
    register_sidebar_widget(array(‘Content License 3’, ‘widgets’), ‘widget_cc’);
    register_sidebar_widget(array(‘Content License 4’, ‘widgets’), ‘widget_cc’);`

    Now when I go to the admin interface, four different widgets show up that I can drag to four different sidebars.

    Shameless plug: more info about multiple widgets on the blog post.

    I have just read marstonstudio’s stuff. Its very neat. Thanks.

    This works for creating more available copies, but if they have a control panel, it is shared between all of them. How can you specify which control goes to which widget?

    marstonstudio’s technique does not work if you need different data in each widget. In his example, the data stays the same, as he is displaying license information.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Multiple Widget Instances’ is closed to new replies.