日志总数:<?php $count_posts = wp_count_posts(); echo $published_posts = $count_posts->publish; ?> 篇 总访问量:<?php get_totalviews(true, true, true); ?> 次 //配合wp-postviews插件才可以用。 评论总数:<?php $total_comments = get_comment_count(); echo $total_comments['approved'];?> 条 注册会员:<?php $users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users"); echo $users; ?> 个 链接总数:<?php $link = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->links WHERE link_visible = 'Y'"); echo $link; ?> 个 最新更新:<?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; ?> 页面总数:<?php $count_pages = wp_count_posts('page'); echo $page_posts = $count_pages->publish; ?> 个 草稿:<?php $count_posts = wp_count_posts(); echo $draft_posts = $count_posts->draft; ?> 篇 栏目分类总数:<?php echo $count_categories = wp_count_terms('category'); ?> 个 标签总数:<?php echo $count_tags = wp_count_terms('post_tag'); ?> 个
THE END
发现你的速度好快,基本都是秒开。插件没有用吧?
有用插件,和你博客打开的速度差不多啊。
吼吼!这个不错!
喜欢就好
小功能大全啊
增加查询量的功能,没多大意义。