I read through previous threads on this topic, but still need help. I want to exclude two categories (15 and 16) from the Recent Posts (renamed "Latest Headlines") that appears on my home page in the top sidebar.
I went into sidebar.php and edited the code this way:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar Top') ) : ?>
<?php $recent = new WP_Query("cat=-15,-16&showposts=5"); while($recent->have_posts()) : $recent->the_post();?>[*]<?php the_title(); ?>
<?php endwhile; ?>[/list]
<?php endif; ?>
But nothing shows up on the home page at all for Latest Headlines that way. If I enable the Recent Posts widget, headlines from all categories show up, which I clearly don't want.
What am I doing wrong this time? :)