Awesome.. tweaked the code a bit and it works great.
One more question – I tried adding the_excerpt() so it looked like this (as I’d like to have a short excerpt of each entry that gets displayed in the sidebar):
`<?php
global $post;
$categories = get_the_category();
foreach ($categories as $category) :
?>
<h2><?php echo $category->name; ?></h2>
<?php
$posts = get_posts(‘numberposts=20&category=’. $category->term_id);
foreach($posts as $post) :
?>
<?php the_title(); ?>
<?php the_excerpt(); ?>
<?php endforeach; ?>
<?php endforeach; ?>`
When I do that, the same excerpt gets shown for all of the entries, although the entry titles change.
Any idea of what I might be doing wrong?