I want to exclude posts from one category. These posts should not show in the sidebar on the homepage only when I explicitly don't want that particular posts to show. In all other cases these posts will be displayed.
I have tried with plugin "WP Hide Post", but that seems not to work with sidebars, only for regular loops. I've checked on hide this post from homepage, and nothing happens.
This is the code I use to display post in homepage sidebar:
<?php query_posts('category_name=events&showposts=3'); ?> <?php while (have_posts()) : the_post(); ?> <h2 id="post-<?php the_ID(); ?>"> <a href="<?php the_permalink() ?>" rel="bookmark" accesskey="s"><?php the_title(); ?></a> </h2> <div class="myclass3"><?php wpe_excerpt('wpe_excerptlength_index', 'wpe_excerptmore'); ?> </div><BR> <?php endwhile; ?>