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?
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?
query_posts(array('post__not_in' => array(123)));
excludes post ID 123.
<?php query_posts(array('showposts'=> 3,'cat' => 27,'post__not_in' => array($thePostID))); ?>
Worked like a charm, thank you very much filosofo
You must log in to post.