• I would like to add a second side bar to my blog (www.pistonsnationblog.com). I have a side bar to the right, I’d also like to have one on the left, I’m not sure how to edit my stylesheet to make this happen I’m hoping someone can help :/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Adding a second side bar?
    I’m just curious! why have many sidebars?

    Anyway, in order to edit your stylesheet.. you can go to the your current themes folder then the file called style.css…

    You can edit and change the style in here..

    hope it would help..

    I can edit the CSS no problem and could add another sidebar manually but it won’t work the same, it’ll be static and I wouldn’t be able to use widgets in it. My problem is simple, CSS and HTML are easy as pie for me… but this PHP and modular design is kicking me in the head every time I try to figure it out. The problem is that I have no idea what anything does.

    The main reason why I want another sidebar is that mine is getting rather cluttered and I don’t like it. I want navigation on the left and ads/links/tags on the right.

    Heh, I just realize that this isn’t my pose from yesterday… but I have the same problem. If anyone could point myself and PistonsNationBl towards documentation on adding a sidebar or offer some code solutions that would be awesome.

    Found this post, hope it helps. I’m about to test it out:
    http://wordpress.org/support/topic/133896?replies=2

    Why not try to used the available wordpress themes with two side bar such as this one:
    http://www.onehertz.com/portfolio/wordpress/mandigo/
    ?
    Anyway just try to find the themes out there.. i’m sure there’s one!

    My current theme has 4 sidebars for maximum customisation fun 🙂

    Anyway, I did it like this:

    functions.php:

    if ( function_exists('register_sidebar') )
    register_sidebar(array('name'=>'Sidebar 1',
    'before_widget' => '<div id="%1$s" class="side-c %2$s">', // Removes <li>
    'after_widget' => '</div>', // Removes </li>
    'before_title' => '<h3>', // Replaces <h2>
    'after_title' => '</h3>', // Replaces </h2>
    ));
    register_sidebar(array('name'=>'Sidebar 2',
    'before_widget' => '<div id="%1$s" class="side-c %2$s">', // Removes <li>
    'after_widget' => '</div>', // Removes </li>
    'before_title' => '<h3>', // Replaces <h2>
    'after_title' => '</h3>', // Replaces </h2>
    ));

    In my sidebar.php:

    <table border="0" width="100%" cellspacing="15">
    <tr>
    <td style="vertical-align: top;"><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 1') ) ; ?></td>
    <td style="vertical-align: top;"><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar 2') ) ; ?></td>
    </tr>
    </table>

    Hope this helps.

    Thanks, it took some tweaking but I got that code to work. The end result was:

    In functions.php

    if ( function_exists('register_sidebar') )
        register_sidebar(array('name'=>'sidebar1',
            'before_widget' => '',
        'after_widget' => '',
     'before_title' => '<h2 class="decay">',
            'after_title' => '</h2>',
        ));
    
    if ( function_exists('register_sidebar') )
        register_sidebar(array('name'=>'sidebar2',
            'before_widget' => '',
        'after_widget' => '',
     'before_title' => '<h2 class="decay">',
            'after_title' => '</h2>',
        ));

    and in my sidebar.php

    <?php if ( !function_exists('dynamic_sidebar')
            || !dynamic_sidebar('sidebar1') ) : ?>

    All the default stuff

    <?php endif; ?>

    I’m not sure why your code didn’t work right off for me. So I just modified the existing code to reflect the difference I noticed between the two. The confusion I was having before was that the template I was using didn’t name the sidebar array so I didn’t know one could differentiate between the two. Thanks for the help.

    nthnlsmmrs, can you put your CSS style you tuned out here ?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Add a second sidebar??’ is closed to new replies.