wordpress中显示多少人浏览了文章

可以使用WP-PostViews插件

使用方法如下:

  1. Open wp-content/plugins Folder
  2. Put: Folder: wp-postviews
  3. Activate WP-PostViews Plugin
  4. Go to WP-Admin -> Settings -> PostViews to configure the plugin.

Usage

  1. Open wp-content/themes/<YOUR THEME NAME>/index.php
  2. You may place it in archive.php, single.php, post.php or page.php also.
  3. Find: <?php while (have_posts()) : the_post(); ?>
  4. Add Anywhere Below It (The Place You Want The Views To Show): <?php if(function_exists('the_views')) { the_views(); } ?>
  5. Or you can use the shortcode 194 views or 183 views (where 1 is the post ID) in a post

Read More