Feb 07 2007

3 Column Simpla Theme with Widgets

Published by under General and tagged: , , ,

I was going to update my original post with this but I thought it would be easier to put it in a seperate post. Here’s how I updated the Simpla theme to have 3 columns with widgets.

First read this post: http://stuart.amanzi.co.nz/2006/05/30/new-simpla-theme-with-widgets/

Then edit the sidebar.php like this:

<div id="sidebar2">
<ul>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?>
    <li id="pages">
        <h2>Pages</h2>
        <ul>
            <li><a href="<?php echo get_settings('home'); ?>/">Home</a></li>
            <?php wp_list_pages('title_li='); ?>
        </ul>
    </li>
<?php endif; ?>
</ul>
</div>
<div id="sidebar">
<ul>
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>
    <li id="links">
        <ul>
        <?php get_links_list(); ?>
        </ul>
    </li>
<?php endif; ?>
</ul>
</div>

Then edit the style.css to get the two sidebars to show correctly: (just modify the stylesheet with the bits below)

#wrap{
    margin:0 auto;
    text-align:left;
    width:980px;
}
#content{
    font-size:1.2em;
    float:left;
    padding:1em;
    width:600px;
}
#content .wide{
    width:980px;
}
#sidebar{
    font-size:1.1em;
    float:right;
    padding:0;
    width: 165px;
    border-right: 1px dotted #ddd;
}
#sidebar2{
    font-size:1.1em;
    float:right;
    padding:0;
    width: 165px;
}

Then finally, you need to edit the functions.php file to reference both sidebars:

<?php
if ( function_exists('register_sidebar') )
    register_sidebars(2);
?>

Let me know if you have any other questions.

No responses yet




Trackback URI | Comments RSS

Leave a Reply