Advertisement
alchymyth

two sticky loops 2

Apr 13th, 2012
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.53 KB | None | 0 0
  1. <?php $do_not_duplicate = array();
  2.   $my_query = new WP_Query(array('posts_per_page' => 3, 'post__in' => get_option( 'sticky_posts' ), 'ignore_sticky_posts' => true ) );
  3.   while ($my_query->have_posts()) : $my_query->the_post();
  4.   $do_not_duplicate[] = $post->ID; ?>
  5. do stuff 1 <?php the_title(); ?>
  6.   <?php break; endwhile; ?>
  7.  
  8.  
  9.  
  10. <?php
  11.   while ($my_query->have_posts()) : $my_query->the_post();
  12.   $do_not_duplicate[] = $post->ID; ?>
  13. do stuff 2 <?php the_title(); ?>
  14.  
  15.   <?php endwhile; ?>  
  16.   <?php wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement