
Wordpress
I used the Simpla WordPress theme for this site but found that it did not allow for the use of widgets on the sidebar. I crawled the InterTubes and found that the Typpz Blog experienced the same issues but contained a post showing how to make the required changes manually while also providing an updated theme with the changes included. I made my changes manually so I could better understand the mechanics of the site but if you’re considering the Simpla theme then you may want to just download the updated theme.
Here is the manual changes I made for reference:
cat /dev/null > sidebar.php
I wiped the contents of the sidebar.php file in the Simpla theme directory from command line. This can be done through the theme editor in WordPress but I prefer to work within Linux.
Then I pasted the below code into the now empty sidebar.php.
<div id=”sidebar”>
<ul>
<?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?><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>
<li id=”categories”>
<h2>Categories</h2><ul>
<?php wp_list_cats(‘sort_column=name&optioncount=1&hierarchical=0′); ?>
</ul>
</li>
<li id=”links”><ul>
<?php get_links_list(); ?>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
Once sidebar.php file was saved I then created a new file in the same directory called functions.php and entered the below code.
<?php
if ( function_exists(‘register_sidebar’) )
register_sidebar();
?>
That makes the theme widget friendly so you can now go crazy through the admin system. However, a minor change is required on the sidebar to deal with some creeping dots on the right sidebar. To correct this an addition is required in the style.css file.
Find this section in style.css:
#sidebar ul li{
border-bottom:1px dotted #ddd;
margin-bottom:0.3em;
padding:0.3em;
}
Change it to:
#sidebar ul li{
margin-bottom:0.3em;
padding:0.3em;
}
#sidebar ul ul li{
border-bottom:1px dotted #ddd;
}
Hats off to Typpz for providing the code and updated theme for everyone to enjoy!