Wordpress Queris to count updates post per day in specific categories

Anyone know how to count updates post per day (example: in this day/date) in specific categories with wordpress query ?

Thanks a lot.


I don't know if I fully understand your question, do you want a count of posts in a specific category posted on a specific day/date?

In this case, you can just create an instance of WP_Query and pass in the time parameters and categories you want you look at.

Something like,

$today = getdate();
$args = array('year' => $today["year"], 'monthnum' => $today["mon"], 'day' => $today["mday"], 'category_name' => 'Uncategorized');
$search = new WP_Query($args);
$count = $search->found_posts;

If you want to return posts based on the modified date (you state count updates post per day, which I don't understand), then you need to add a 'posts_where' filter instead of the time parameters of args.

See the time parameters link above for sample code and explanations on using this - but in slightly modifying one of their examples you can create something like this.

// Create a new filtering function that will add our where clause to the query
function filter_where( $where = '' ) {
$where .= " AND post_modified >= '2010-03-01' AND post_modified < '2010-03-16'";
return $where;

add_filter( 'posts_where', 'filter_where' );
$query = new WP_Query( $query_string );
remove_filter( 'posts_where', 'filter_where' );

Need Your Help

VLOOKUP help in Excel?

mysql excel vlookup

I have three columns of data, which look like:

Javascript setting object properties with value type in the prototype?

javascript variables object prototype

I always have set properties with a value type in the prototype of the object as this stops them having to be initialized every time the object is created.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.