Exclude Sticky Posts from Query
-
Hi, I’ve been searching for a week a solution to my problem and I didn’t find any, so I hope maybe I could find some help here.
I want to exclude all sticky posts from my query_posts, which means even if a sticky post should appear in that list because it’s a recent post from this category, I want it (them, the sticky posts) not to show at all.
Here what I tried so far, without much success:
<?php array(“post__not_in” =>get_option(“sticky_posts”));
query_posts(‘showposts=10&cat=2’); ?><?php while (have_posts()) : the_post(); ?>
My stuff here
<?php endwhile; ?>Any idea how to do that? I thought it could be simple, but it’s clearly not (for me)…
Thanks!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Exclude Sticky Posts from Query’ is closed to new replies.