Excluding Sticky Posts from The Loop and from WP_Query() in WordPress?
The following snippet is from a sidebar widget that lists "recent posts". Since its on the home page and I feature my lastest sticky post prominently on that page, I want to skip over the sticky in this loop. However, the post_not_in=sticky_posts
has no effect.
?php
$the_query = new WP_Query("showposts=$numberoffset=1order=ASCpost_not_in=sticky_posts");
while ($the_query-have_posts()) : $the_query-the_post();
$do_not_duplicate = $post-ID; ?
Topic sticky-post wp-query Wordpress
Category Web