How can I exclude certain posts from the wordpress loop

In the wordpress loop, how can I prevent 2 of my posts from appearing, ie exclude the:

<?php while ( have_posts() ) : the_post(); ?>

Is it possible?

Read More

Thanks!

Related posts

Leave a Reply

1 comment

  1. try this:

    query_posts(array('post__not_in' => array(1,2)));
        if ( have_posts() ) : while ( have_posts() ) : the_post();
    

    where 1 and 2 are posts that you want to exclude.