Creating a Loop that only Shows Sticky Posts?
Can anyone help me with the following WP_Query? I just want to show a loop that shows only our sticky topics. I’m trying to use this:
` $sticky = get_option( ‘sticky_posts’ );
$args = array(
‘posts_per_page’ => 1,
‘post__in’ => $sticky,
‘ignore_sticky_posts’ => 1,
‘post_type’ => ‘topic’
$stickythreads = new WP_Query($args);
while ($stickythreads->have_posts()) : $stickythreads->the_post(); ?>
But it isn’t limiting the results to sticky posts?
- You must be logged in to reply to this topic.