Blog Archives

Site status for wordpress users using wordpress.com stats

If you installed wordpress.com stats plugin you can easily bring your site visitor status to front page. Copy the code below and paste where ever you wants to show.

php
$post_stats = null;
$views=0;
if ( function_exists('stats_get_csv') )
{
global $post_views;
$post_stats = stats_get_csv('postviews', 'days=-1&limit=-1&summarize');
foreach($post_stats as $posts)
{
$views+=$posts['views'];
}
echo "Visitors:".$views;
}
?>

Design a site like this with WordPress.com
Get started