Here is a very crude script I’ve knocked up to get what you are after:
<?php
require('wp-blog-header.php');
$posts = get_posts('numberposts=-1&order=ASC');
$posts_times = array();
foreach ($posts as $post) {
$post_time = strtotime($post->post_date);
$offset = $post_time % (60*60*24);
$post_time -= $offset;
$posts_times[$post_time]++;
}
$keys = array_keys($posts_times);
$running_count = 0;
$end_data = array();
for($i = $keys[0]; $i <= $keys[(count($keys)-1)]; $i += (60*60*24)) {
$running_count += $posts_times[$i];
$end_data[] = array(
array(date("Y", $i), date("m", $i), date("d", $i)),
$running_count
);
}
echo "<pre>";
print_r($end_data);
?>
Related Posts:
- How to query serialized array by comparing greater than (>=)?
- JSON not valid after json_encode posts
- how to limit and display tag?
- Network wide post count (WP Multisite)
- How to update serialized post meta?
- Insert woocommerce products programmatically with featured image and gallery
- Add multiple tags to multiple posts
- Custom order for Mysql array
- how to get post order by post id wp_query?
- Querying another post category to match current post and display in loop
- Need to know custom code to display random and most viewed posts in wordpress posts and pages
- Get latest post from categories
- Categories Listing and Highlighting current category item
- Save / Update meta data as multidimensional array
- Merge get_comments & get_posts into a single query
- WordPress text field in array problem
- Get the correct meta_value with get_post_meta
- I am not getting result from php function that is json encoded
- Get current user array with post string
- Sort Posts Alphabetically by Multiple Categories [duplicate]
- Why is $_POST Empty in Profile Edit Admin?
- Exclude a ‘portfolio’ custom category?
- posts_per_page – Repeats only first posts ‘post__in’ array
- How to add an admin notice upon post save/update
- How does one reduce the number of stored revisions?
- How to Group Posts by the First Letter or Number?
- Show the title of the latest post by author
- Developing a secure front end post editing form
- I’m having some issues with previous_post_link() and next_post_link()
- Specify number of posts in my ‘tax_query’
- Where is the “ancestors” post object attribute?
- How can I display a specific user’s first published post?
- How to show a full post, not just an excerpt
- get selected post using $_GET
- How to hide first gallery for every post?
- How to display related posts by subcategory and not parent category
- Is it possible to create a form post wordpress custom navigation link?
- creating front end image uploader that uploads images as posts
- How can I sort posts by the date and a custom meta field?
- Cannot get $post object in name_save_pre hook
- Update Modified date when scheduled posts get published
- XML-code sent via the POST method to the URL (API) [closed]
- Get all images in post and comments like Twitter before post title
- How to list recent posts in a wp nav menu?
- “Right Way” to make custom Loop respect reading settings inside admin panel?
- How to check if single.php has already called the_post_thumbnail function
- WordPress query_posts by tag doesn’t work anymore(?)
- why does wordpress ignore the post args?
- obtain the author id given the post id
- Get current post data into array?
- Post list display year wise
- How can I add a box to edit Order on a regular post?
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- WordPress 302 Redirect to Random Product/Post/Page
- Sort by last word in title
- Add code to a specific post’s content
- Post Status Frontend Announcement
- When WP_Query only returns 1 post, how do I automatically redirect to that post?
- Optimize CPT-function with a loop
- When using Tribe Events Calendar, querying for a specific event category returns nothing
- If post exists, make it a comment in existing post with same name?
- How to display only one category in a custom post type?
- Use Post as Front Page
- Error while excluding a post from another loop (using its ID)
- definining own teaser text for post
- I need to create “View Profile” and “Edit Profile” links by incorporating the Post Title/ID, but can’t seem to manage it
- Turn off display for custom sidebar post widget when on the post it’s displaying
- How to order posts in WordPress by date?
- How to remove special characters in post title
- Search results with pagination not working
- My post permalinks are redirecting to the post archive page for some reason?
- Exclude posts in a category on one page but show those posts on a different page
- Hide or remove custom post status
- custom post single page
- show loop id post , only first id can read
- Add id attribute to h1 element of wordpress post
- Loading posts outside wordpress
- Disable archiving of old posts?
- Customizing individual images on posts
- How to add a class to links inside posts text
- Query post category & remove any post id
- Converting Posts to Pages
- Changing a field value on submit using a PHP variable
- No comments on static front page
- Latest comment post should be the first post in the blog
- Run Jquery Script after delete post in front end
- How to limit the number of results for all query_posts on mysite
- how to show posts on different pages if number of post per page is one
- The next_posts_link() works only with original $wp_query
- Latest news mini images
- User driven content problems
- Admin moderates ALL comments (including post author)
- Load posts from external source if not found in database
- jquery: getting contents of #content field on post page
- Not displaying any articles on a custom made file
- How to show total view count across all posts for an author
- How can we pass a value from the_permalink() at WordPress?
- How to redirect image attachment to its original post
- How can I make my blog private? [closed]
- Edit Page button is gone