Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $args = array('posts_per_page' => -1, 'orderby' => 'date' );
- $myQuery = new WP_Query($args);
- $date = '';
- if ( $myQuery->have_posts() ) : while ( $myQuery->have_posts() ) : $myQuery->the_post();
- if ( $date != get_the_date() ) {
- echo $date;
- echo '<hr />';
- $date = get_the_date();
- }
- the_title(); // or whatever you want here.
- echo '<br />';
- endwhile; endif;
- wp_reset_postdata();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement