• Resolved Mehmet

    (@mhmtozek)


    I’ve been struggling around since couple of days to figure out how to exclude a specific post (not category, just a post to be excluded) from the loop.

    Is there a way/hack with in the loop to exclude a specified post?

Viewing 2 replies - 1 through 2 (of 2 total)
  • query_posts(array('post__not_in' => array(123)));

    excludes post ID 123.

    Thread Starter Mehmet

    (@mhmtozek)

    <?php query_posts(array('showposts'=> 3,'cat' => 27,'post__not_in' => array($thePostID))); ?>

    Worked like a charm, thank you very much filosofo

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to exclude a post from the loop’ is closed to new replies.