Title: Two widgetized sidebars
Last modified: August 19, 2016

---

# Two widgetized sidebars

 *  Resolved [lalaith](https://wordpress.org/support/users/lalaith/)
 * (@lalaith)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/two-widgetized-sidebars/)
 * I created a theme for a blog that has two sidebars. I want to have widgets in
   both sidebars, but right now the sidebars are exactly the same. I did a search
   on the forums here and I found out that I can fix this problem by naming each
   of my sidebars, but I’m not exactly sure how to do that. Here’s my functions.
   php:
 *     ```
       <?php
       if ( function_exists('register_sidebar') )
           register_sidebar(sidebar-left);
           register_sidebar(sidebar-right);
       ?>
       ```
   
 * Do I need to define names for my sidebars in sidebar-right.php and sidebar-left.
   php?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Christian Schenk](https://wordpress.org/support/users/chschenk/)
 * (@chschenk)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/two-widgetized-sidebars/#post-1120384)
 * You’ll have to do two things: first, register the sidebars with different names
   like so:
 * > register_sidebar( array(‘name’=>’sidebar-left’) );
   >  register_sidebar( array(‘
   > name’=>’sidebar-right’) );
 * Second, when calling `dynamic_sidebar` pass the appropriate name of the sidebar
   to the function:
 * > if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘sidebar-left’)):?
   > >
   >  <?php endif; ?>
 * or
 * >  if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(‘sidebar-right’)):?
   > >
   >  <?php endif; ?>
 * You can read more about that in the [docs](http://codex.wordpress.org/Widgets_API).
 *  Thread Starter [lalaith](https://wordpress.org/support/users/lalaith/)
 * (@lalaith)
 * [16 years, 11 months ago](https://wordpress.org/support/topic/two-widgetized-sidebars/#post-1120504)
 * It’s working perfectly. Thank you very much! I really appreciate it. =D
 *  [mikoleg](https://wordpress.org/support/users/mikoleg/)
 * (@mikoleg)
 * [16 years, 10 months ago](https://wordpress.org/support/topic/two-widgetized-sidebars/#post-1120678)
 * it does not work in wp 2.8.x stable, its loosing widgets.. what the hell is going
   on with wordpress

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Two widgetized sidebars’ is closed to new replies.

## Tags

 * [widgets](https://wordpress.org/support/topic-tag/widgets/)

 * 3 replies
 * 3 participants
 * Last reply from: [mikoleg](https://wordpress.org/support/users/mikoleg/)
 * Last activity: [16 years, 10 months ago](https://wordpress.org/support/topic/two-widgetized-sidebars/#post-1120678)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
