wordpress网站统计代码

已为老胡 2012-03-20 PM 1002℃ 0条

具体的效果请查看小胡博客的侧边栏,多了不说了!

&nbsp;&nbsp;文章数量:<?php $count_posts = wp_count_posts();
 echo $published_posts = $count_posts->publish; ?>篇 &nbsp;&nbsp;&nbsp;
评论数量:<?php $total_comments = get_comment_count();
echo $total_comments['approved'];?>条<br />
&nbsp;&nbsp;总浏览数量:<?php get_totalviews(true, true, true); ?> 次<br />
&nbsp;&nbsp;最后更新于:<?php $last = $wpdb->get_results("SELECT MAX(post_modified)
AS MAX_m FROM $wpdb->posts WHERE (post_type = 'post' OR post_type
= 'page') AND (post_status = 'publish' OR post_status = 'private')");
$last = date('Y年n月j日', strtotime($last[0]->MAX_m));echo $last; ?>  <br />
&nbsp;&nbsp;本站迄今运行:<?php echo floor((time()-strtotime("2007-07-07"))/86400); ?>天<br />

收藏喽!

非特殊说明,本博所有文章均为博主原创。

评论啦~