<div class="sidebar">
<?php include (TEMPLATEPATH . '/topsform.php'); ?><!-- search form -->
<br />
<br />
<div id="navcontainer">
<ul id="navlist">
<li><!-- Activity -->
<ul><h2><?php _e('Activity'); ?></h2>
<!--This will show the last 10 posts, including the last one. To change the number of post shown
edit the 'nuberposts=x' to whatever value you want, and to skip the last one (or last 2, 3, etc.)
increase the value of 'offset=x' (default is "0" so it will start by the last post)-->
<?php
$posts = get_posts('numberposts=10&offset=0');
foreach ($posts as $post) :
?>
<li>
<a href="<?php the_permalink(); ?>" title="<?php the_title() ?>"><?php the_title() ?></a>
</li>
<?php
endforeach;
?>
</ul>
</li><!-- End of Activity -->
<!-- Pages Just uncomment if you want a list of pages in the frontpage
<li>
<h2><?php _e('Pages'); ?></h2>
<ul>
<?php wp_list_pages('title_li='); ?>
</ul>
</li>
-->
<li><!-- Archives -->
<h2><?php _e('Archives'); ?></h2>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
</li><!-- End of Archives -->
<li><!-- Categories -->
<h2><?php _e('Categories'); ?></h2>
<ul>
<?php wp_list_cats('optioncount=0'); ?>
</ul>
</li><!-- End of Categories -->
<?php if ( is_home() ) { ?>
<?php if (function_exists('wp_theme_switcher')) { ?>
<li><!-- Theme switcher -->
<h2><?php _e('Themes'); ?></h2>
<?php wp_theme_switcher(); ?>
</li><!-- End of Theme switcher -->
<?php } ?>
<li><!-- Feeds -->
<h2><?php _e('Feeds'); ?></h2>
<ul>
<li><a href="<?php bloginfo('rdf_url'); ?>" title="RDF/RSS 1.0 Feed">RDF/RSS 1.0</a></li>
<li><a href="<?php bloginfo('rss_url'); ?>" title="RSS 0.92 Feed">RSS 0.92</a></li>
<li><a href="<?php bloginfo('rss2_url'); ?>" title="RSS 2.0 feed">RSS 2.0</a></li>
<li><a href="<?php bloginfo('atom_url'); ?>" title="Atom feed">Atom</a></li>
<li><a href="<?php bloginfo('comments_rss2_url'); ?>" title="Comments RSS 2.0 Feed">Comments [RSS 2.0]</a></li>
</ul>
</li><!-- End of Feeds-->
<li><!-- Meta -->
<h2><?php _e('Meta'); ?></h2>
<ul>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eX
tensible HyperText Markup Language">XHTML</abbr></a></li>
<li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li>
<li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordP
ress</a></li>
<?php wp_meta(); ?>
</ul>
</li><!-- End of Meta -->
<?php } ?>
</ul>
</div>
</div>