Advertisement
Guest User

Untitled

a guest
Feb 8th, 2013
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. $args = array('posts_per_page' => -1, 'orderby' => 'date' );
  2.  
  3. $myQuery = new WP_Query($args);
  4.  
  5. $date = '';
  6.  
  7. if ( $myQuery->have_posts() ) : while ( $myQuery->have_posts() ) : $myQuery->the_post();
  8.  
  9. if ( $date != get_the_date() ) {
  10.     echo $date;
  11.     echo '<hr />';
  12.     $date = get_the_date();
  13. }
  14.  
  15. the_title(); // or whatever you want here.
  16. echo '<br />';
  17.  
  18. endwhile; endif;
  19. wp_reset_postdata();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement