统计信息包含:资源总数、会员数量、本周更新、今日更新等,当然你也可以修改名称的统计数据;
效果图如下:
文件位置一: /ripro/parts/diy-footer.php/
<p class="fr xk-data" id="wp_vip_stats"> <em>注册用户</em> <strong class="hl"><?php $users = $wpdb->get_var("SELECT COUNT(ID) FROM $wpdb->users"); echo $users; ?></strong> <em>资源数</em><strong class="hl"><?php $count_posts = wp_count_posts(); echo $published_posts = $count_posts->publish;?></strong> <em>最后更新</em><strong class="hl"><?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; ?></strong> </p>
css样式文件位置:/ripro/assets/css/diy.css/
/*统计样式*/ .xk-data em { display: inline-block; font-size: 12px; padding-right: 8px; padding-left: 20px; } address, caption, cite, code, dfn, em, i, strong, th, var { font-style: normal; font-weight: normal; } .xk-data strong { line-height: 1; font-size: 24px; color: #f84270; }