添加WordPress文章阅读量的最简单办法
将下面代码添加到Functions.php //取得文章的阅读次数 function post_views($before = ‘点击 ‘, $after = ‘ 次’, $echo = 1) { global $post; $post_ID = $post->ID; $views = (int)get_post_meta($post_ID, ‘views’, true); if ($ech
阅读更多 »
将下面代码添加到Functions.php //取得文章的阅读次数 function post_views($before = ‘点击 ‘, $after = ‘ 次’, $echo = 1) { global $post; $post_ID = $post->ID; $views = (int)get_post_meta($post_ID, ‘views’, true); if ($ech
阅读更多 »