內容簡介
Post Views for WP 可以讓你揭示一篇文章或頁面被觀看的次數。使用這個外掛很容易,只需要一個步驟就可以啟用。
功能包括:
您可以選擇要為哪些文章或頁面計算和顯示觀看次數。
設置/重置計數間隔的選項
通過 IP 排除用戶
根據您的要求自動或手動使用短代碼顯示文章觀看次數
支持短代碼,只需複製/粘貼 [post_viewsfwp] 即可
如何使用?
一個步驟的設置就可以使用了,只需進入 WP-Admin -> 設置 -> PostViews for WP 進行配置即可。
只需在列出的選項中啟用 Post/Page Views,即可啟用。
或者,您可以使用以下功能直接顯示:
打開路徑 wp-content/themes/<YOUR ACTIVE THEME NAME>/index.php
以下代碼可以在許多地方使用,例如在 post.php、page.php、single.php、archive.php 中,也可以按照您的要求使用。
搜索:<?php while (have_posts()) : the_post(); ?>
找到後,在它下面的任何位置添加:if(function_exists(‘post_views_for_wp_above_the_content’)) {
post_views_for_wp_above_the_content($postID);}。
外掛標籤
開發者團隊
原文外掛簡介
Post Views for WP will allow you to unveil how many number of times a post or page had been viewed. It is quite easy to use as it has only one step to Set it up and running.
Features include:
You can Opt the post types for which post or page views will be counted and displayed.
Option to set/reset counts interval
Excluding users by IPs
Post views display conditions such as automatic or manual via shortcode as per your requirement
Shortcode Support added, simply copy/paste [post_viewsfwp] as per requirement
How to Use?
One Step Setup to get up and running, Just Go to WP-Admin -> Settings -> PostViews for WP to configure the plugin.
Simply enable wherever you want to enable Post/Page Views from the listed options, that’s it!
Or you can use the function below to directly echo/display it.
Open the path wp-content/themes/
The following Code can be used in many places such as in post.php, page.php, single.php, archive.php as well as per your requirement.
Search for:
Once found, Add if(function_exists(‘post_views_for_wp_above_the_content’)) {
post_views_for_wp_above_the_content($postID);} anywhere Below It (Your concerned position).
