Excluding a post from the loop
-
Hello,
I am trying to exclude a post from the loop and can’t figure out how to do it.
Here is my code:‘<?php
{
$posts = query_posts($query_string .
‘&orderby=title&order=asc&posts_per_page=-1’);
}
if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>’I’m pretty sure I need to add something to the “query_posts” line, but I don’t know how to make it work.
Can someone help me add what I need to exclude a post by id or an array of posts by id?
Any help would be greatly appreciated!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Excluding a post from the loop’ is closed to new replies.