How can i call a sticky to the top of this loop
-
I have the following on my home page which does all I need –
Except:
My sticky posts now fall to the bottom of the loop. Does anyone know the neatest way to regain my stickies at the top of the page.. many thanks
Thanks!
<?php $my_query = new WP_Query(‘category_name=featured&showposts=5’);
$counter=0; while ($my_query->have_posts()) : $my_query->the_post(); $counter++;
$do_not_duplicate = $post->ID;?>
<div <?php post_class(); id=”post-<?php the_ID(); ?>”>
<?php if ($counter > 1) ?>
<h2>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></h2>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<?php
if ($counter < 1) {
the_content(”);
} else {
the_excerpt(”);
}
?>
- The topic ‘How can i call a sticky to the top of this loop’ is closed to new replies.