Adding a 2nd Sidebar in a specific Wordpress theme

admin

Administrator
Staff member
I learned <a href="https://stackoverflow.com/questions/1396346/php-code-for-each-wordpress-widget">how to add additional sidebars</a> now I need to figure out how to add an extra sidebar besides the one already displayed in the theme Librio ( wordpress.org/extend/themes/librio ).

I absolutely have no idea where to look. The code is pure chaos and not self explanatory.

My sidebar.php contains the following code:

Code:
&lt;div id="idontknow"&gt;
&lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar1') ) : ?&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;

Now if I duplicate and add the same code but with 'sidebar2' all I get is the 2nd sidebar being displayed INSIDE the 1st sidebar.

Code:
&lt;div id="idontknow"&gt;
&lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar1') ) : ?&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;

&lt;div id="ireallydont"&gt;
&lt;?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('sidebar2') ) : ?&gt;
&lt;?php endif; ?&gt;
&lt;/div&gt;

I don't want that. I want 2 separate sidebars side by side. Can somebody help me out, pretty please?

I tried to expirement with CSS and id=leftsidebar and id=rightsidebar, but it simply doesnt work.

<strong>Just to clarify again:
I have 2 sidebars! I've even got the correct code in functions.php</strong>

Code:
if ( function_exists('register_sidebar') )
    register_sidebar(array('name'=&gt;'sidebar1',
    'before_widget' =&gt; '&lt;div class="block"&gt;',
    'after_widget' =&gt; '&lt;/div&gt;',
    'before_title' =&gt; '&lt;h3 class="widgettitle"&gt;',
    'after_title' =&gt; '&lt;/h3&gt;',
));
register_sidebar(array('name'=&gt;'sidebar2',
    'before_widget' =&gt; '&lt;div class="block"&gt;',
    'after_widget' =&gt; '&lt;/div&gt;',
    'before_title' =&gt; '&lt;h3 class="widgettitle"&gt;',
    'after_title' =&gt; '&lt;/h3&gt;',
));

<strong>The problem is, like mentioned, the 2nd newly created sidebar is shown inside the 1st sidebar. I want the theme modified so that I have 2 separate sidebars.</strong>