the fastest way imho would be to create a custom sql statement:
global $wpdb;
$rows = $wpdb->query('SELECT DATE(post_date) AS date, COUNT(*) AS count FROM ' . $wpdb->posts . ' GROUP BY DATE(post_date) ORDER BY DATE(post_date)');
foreach ($rows as $row) {
echo $row->date . ': ' . $row->count . '<br>';
}
Related Posts:
- Add custom Attachment Display Setting for images
- Rewriting post slug before post save
- Getting the post_id in wp_ajax function
- Change the default number of posts to show on mobile version
- I am trying to create a simple frontend form for posting
- Post content being duplicated by the_content();
- How can I pass $post object to ‘save_post’ add_action?
- 1 column admin screen options – move submitdiv to bottom
- Single Post Navigation Within Each Category
- Add confirmation popup on “Move to Trash”
- How to get the latest posting time of archived pages in WordPress?
- Insert posts in two tables
- get_next_post() not working
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- custom wordpress post loop – hide iframe content
- Different template for posts of all subcategories of category
- Search for posts based on their url in the admin?
- Add custom field automatically (add_post_meta) with value based on number of words of article
- How to access featured image?
- Mark menu item as current-menu-item for category
- Best way to assign post position in a news site homepage? (no categories, no sticky posts)
- How do I restart my loop with get_next_post()?
- How do I use WP_Query to get a range of posts with custom fields that have numbers with letters in them?
- How to give capability (publish contributors posts) to author role?
- “Duplicate” Posts Appearing Since 3.1.2 Update
- Rename “post” to “article” throughout the admin back end [duplicate]
- Setup a custom dynamic post
- How to make a price range slider from get_post_meta?
- One menu for frontpage (one pager), and a different menu for posts
- pagination for single post by category
- Post page to display specific category
- How to create new post content templates for my users?
- Start post pagination at 0 instead of 1
- How do I change the core post search algorithm? Where is it found/constructed?
- Is it possible to add/tick a category to a post when it is created?
- How many posts does the loop return?
- Posts loop displaying the same post data
- Display Posts on Custom Page
- Possible to alternate between two loops
- How to get a post’s content? [closed]
- Blog Post On Home Page Displaying Page Published Date Not Post Published Date
- Why does a published post only displays the title and not the content in the site? [closed]
- Counter is skipping post when I still want it visible [closed]
- The_excerpt() doesn’t parse – how to change that?
- Can’t understand why sometimes a [caption] field appears
- Trying to edit archive.php to only show post extract, with featured image
- Divs appearing everywhere in post content
- Latest posts by category — how to exclude current post?
- Change post author without using wp_update_post()
- Posts page not showing correct image
- wp_query with ajax
- Post Title List on home page with time
- Add “Posted on” to post date
- Use posts_where to exclude posts ids from wp_query
- Get x recent posts by author?
- How to compare post tags?
- Get a term each custom post type
- Remove Featured Image from posts in specific category?
- Delete all Tag Links from Posts
- Adjust the order for returned posts
- Post in bulk based on category template
- Delete Post but retain image of post [WP REST API]
- user_has_cap filter allows “edit_others_posts” but not is not allowing updating/publishing
- how to add tags to post in the Loop?
- Add data attribute of post_id for Internal links
- Menu Items disappearing/being empty on save or post edit
- Single Post function to display all single post images in a carousel
- Display/Filter post using if else statement
- Search results for ACF data
- link to edit a post has empty target
- Nestling Posts Under Page & Justify Text
- Redirect to custom post if custom archive page has just one result?
- Adding posts updates previous post
- Strange behaviour in WordPress admin
- How do you update post date (year only) in a separate custom field?
- Creating a link to the first post in a category
- sometimes on saving a post as draft, it says Access Denied You don’t have permission to access “mywebsite.com/wp-admin/post.php”
- How do I change the post title’s link on the posts page?
- WordPress text field in array problem
- List Authors For Current Category
- Get query result according to merged array
- Embed image in post from external url
- cleaning out posts that don’t exist anymore but links are still there
- Custom URL Structure for posts with subcategories
- Possible to display X number of authors posts from another WordPress site?
- Theme Unit testing not importing on MAMP server – Fatal error: Maximum execution time of 60 seconds exceeded
- Post/Edit/Delete Post From Frontend… How?
- Use radio buttons & checkboxes for post categories
- List posts that are in the same category as the current post title
- Wanting to apply different featured images for each post
- Password-protected Posts lead to 404 Error
- Multiple blog “feeds” in a single blog each with distinctly styled post pages
- How to get pagination working with “Pending” Posts
- How do I show the post title if an advanced custom field hasn’t been used?
- Deleting first four characters from all Post Titles
- Post’s arent displaying
- Show with echo if a post has two or more categories
- Can I get custom post items in select box (dropdown)
- Sort Posts Alphabetically Based on Specific Category (Divi)
- Inserting Media on New Post But Hides Previous Uploads for Editor/Contributor