<ul id="sidebar">
<?php if ( !function_exists('dynamic_sidebar')
        || !dynamic_sidebar() ) : ?>
	<li id="categories">
		<h2>Categorieën</h2>
		<ul>
			<?php wp_list_cats('sort_column=name&optioncount=0&hierarchical=0'); ?>
		</ul>
	</li>

	<li id="latest_posts">
		<h2>Nieuwste</h2>
		<ul>
			<?php
				$posts = get_posts('numberposts=20&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>

	<li id="metatags">
		<h2>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="eXtensible 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.com/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress.com</a></li>
	<li><a href="http://www.wpboard.com/" title="WordPress Themes">WPBOARD.Com</a></li>
	<li><a href="http://www.jetpacked.com/" title="Sponsored by">Jetpacked.com</a></li>
	<?php wp_meta(); ?>
		</ul>
	</li>
<?php endif; ?>
</ul><!-- #sidebar -->
