How to get the “stats” plugin that comes with a .wordpress.com blog?
Not installed by default, but available as plugin from repository: WordPress.com Stats
Not installed by default, but available as plugin from repository: WordPress.com Stats
All you need to do is modify the SQL query. Using the code you linked as a base: $numposts = $wpdb->get_var(“SELECT COUNT(*) FROM $wpdb->posts WHERE post_status=”publish” AND year(post_date) = 2010″); if (0 < $numposts) $numposts = number_format($numposts); The ‘AND’ I added basically gives you all the posts of 2010. Change the year accordingly
Turns out WordPress doesn’t deal well with post IDs > 2^31. http://core.trac.wordpress.org/ticket/16445 Tumblr in particular has post IDs greater than this, so it’s not recommended to keep old post IDs from Tumblr on an import.
When you sign in, You can see tiny site stats chart(displayed in above screenshot) in your toolbar called a Sparkline. The number in Sparkline represents the highest number of visitors visited in 48 hours of day. You can find more information in wordpress.com Stats Support. I have copy pasted the content below from this link … Read more
This answer is just to put down a kind of roadmap. I think the question touches some machine learning concepts, you used the right “statistics” tag. You need to build a dictionary plugin learning from your new posts. Probably doing something like: Manually create a first json filter dataset of most used words in your … Read more
“best apache log analyzer plugin for WordPress” This is a joke question, right? If not, no offense, but you’re probably new to the web. And if so, you probably should know that Apache logs actually pick up and log: Search Engine bots (not just Google: any bot, and there are many, many, many…) Comment spam … Read more
The API returns the following columns when you query the postviews table: date post_id post_title post_permalink views For my blog the post_id column was either empty or 0 (for the homepage). So unless you have good values there, you will have to work from the post_permalink value and determine whether it is a page or … Read more
While researching to answer this SO Question, stumbled upon this one, which gave me the final hint. I’ll reproduce the relevant part: Function get_stats_csv /plugins/jetpack/modules/stats.php The function get_stats_csv calls http://stats.wordpress.com/csv.php. If we visit this address, we get this response: Error: api_key is a required parameter. Required parameters: api_key, blog_id or blog_uri. Optional parameters: table, post_id, … Read more
You don’t seem to call posts_count_func() anywhere, so if your transient expires, it’s not getting reset. function posts_shortcode_count_func( $atts ){ $post_count = get_site_transient( ‘total_posts_cache’ ); if( ! $post_count ) { posts_count_func(); $post_count = get_site_transient( ‘total_posts_cache’ ); } return $post_count; } add_shortcode( ‘posts’, ‘posts_shortcode_count_func’ ); According to the docs for get_transient() (which is the non-network version … Read more
A basic user login tracker is pretty trivial to implement. function track_user_login_wpse_100929($id,$user) { $tracking = get_user_meta($user->ID,’tracking_key_name’,true); $tracking[] = time(); update_user_meta($user->ID,’tracking_key_name’,$tracking); } add_action(‘wp_login’,’track_user_login_wpse_100929′,1,2); After that you just need to work out the details such as how long you are going to keep the history, what kind of reports you want to pull, that kind of thing.