WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a "featured" area in header.php that displays the content of the latest sticky post:

$last_sticky_post = get_post(end(get_option('sticky_posts')));

problem is that the same post now renders below it in the Loop - how can I suppress sticky posts from appearing at all in the loop?

share|improve this question

Before your loop do:

$args = array(
    'ignore_sticky_posts' => 1
$query = new WP_Query( $args );
// The Loop
while ( $query->have_posts() ) : $query->the_post();
    echo '<li>';
    echo '</li>';
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.