i think your question has been answered in here
$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();
More info on the query here: http://codex.wordpress.org/Class_Reference/WP_Query
Related Posts:
- Random sort within an already sorted query
- Displaying the category name of a custom post type
- Search by Hyphen
- Exclude drafts in all() view of edit.php
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- How do I reorder (pop and push) items from WP_Query?
- How to exclude latest x posts from a paginated query?
- Reverse chronology of post listing
- WP_Query to work with custom view
- WordPress Number of Posts Not Changing With posts_per_page
- How to add posts to wp_query result?
- Posts for next month
- Exclude posts with specific meta_value while sorting by a separate meta_value
- WP_Query only ONE post, won’t work
- Unable to modify(update) posts – Page not found
- Display the latest posts, published in the last hour, with WP_Query
- Replace Main Query With Custom Query
- Fetch posts from current week (Sunday to Saturday)
- Hiding posts in a list from specified categories
- Converting multiple loops into one single loop with pagination
- Group posts by year in loop
- How would I get 1 latest post from a query for 5 posts?
- How to get posts by multiple post slugs? [duplicate]
- WP_Query do not load specifed number of post
- WP_Query: offset ignored when posts_per_page is -1?
- Exclude posts with empty post_content in wp_query
- Exclude posts from featuring
- Lazy Load using WP_Query pagination
- Only display a certain number of posts, dependent on how many posts there are available in a query
- AJAX filter posts by year
- How can I remove posts of a certain category from homepage after a specified time period?
- Should $found_posts be returned as string in ‘found_posts’ filter hook?
- Get random posts between specific dates / of specific age
- Yearly archive page for future year
- Display post from current category and same tag?
- Ajax load more button in Recent posts widget
- WP_Query orderby not working with meta_value_num and menu_order
- Custom WP_Query with complex ‘post_status’ argument
- is there a way to show the the post title after the image?
- How do I correctly set up a WP-Query to only show upcoming event-posts?
- Blog post per page setting conflicting with custom WP_Query?
- How to filter my search in post if contains a word in title, content or excerpt?
- How to return another post than requested
- Select only post id and meta value with WP_Query
- Random ajax load only works with posts_per_page set to -1
- Query posts and return XML
- how to change the number of posts returned in a specific loop without making it global?
- posts_per_page option limits the number of Gallery items
- Nested WP_Query breaking loop
- Why Query is returning empty array?
- meta_value timestamp older than now
- Get posts with multiple categories
- Do not show children of a category
- Query for first 3 posts to change the look and feel
- Getting blog pagination to work on page set as front page
- search blog posts by author first name and or last name
- unique post in “$args” of wp_query display more than one post
- Display current post position in Elementor Posts widget
- How to give classname to post if post has no content?
- Custom wp-query in wordpress rest api
- posts_per_page returning only one post
- Need to know custom code to display random and most viewed posts in wordpress posts and pages
- How to retrieve certain number of images from a wordpress post?
- WordPress post filter menu
- How to display post list in a table layout (multiple queries in single loop)
- Not all posts showing in query
- WP_Query custom field pass the post id
- WordPress query portfolio posts
- Current and next month posts
- Get latest author posts inside the loop
- Same post appears in related Posts?
- Display 3 posts with different HTML markup using a loop
- How to show multiple posts thumbnail, title and date in widget
- WP_Query outputs wrong post in custom post type
- how to show comments only author which send own posts in wordpress
- Group first, 2nd, 3rd, etc posts by category terms
- Manipulated offset and pagination, can’t display last post anymore
- How to sort WP_Post Object array by object field in php?
- Order by meta_key field in WordPress not meta_value field value
- How to display particular set of wordpress post on a webpage?
- How to create page with post content in it?
- How to remove a post from results by ID after query?
- Show 5 posts and than 3 posts offset with pagination
- Override wp_link_pages pagebreak with filter
- WP_Query extended with AJAX
- Is it possible to query a category with specified posts?
- Blog only showing one post even though more published
- WordPress loop uses unmodified posts array, why?
- Show posts between two Custom Fields date
- Query to get data of a post, if in category?
- Order posts by custom field
- Why I have this strange behavior when I try to exlude the featured post from posts visualization?
- Remove duplicated posts in the loop if post has more than one category
- Why I getting only 1 post?
- The next_posts_link() works only with original $wp_query
- Limit amount of pages shown in pagination within wp_query
- First post in loop displays twice
- Get related posts matching most of the provided tags using WP_Query
- WP_Query post_tilte search in posts table
- Is it possible to use the_post 2 times in one loop