[WordPress] 外掛分享: AJAX Hits Counter + Popular Posts Widget

首頁外掛目錄 › AJAX Hits Counter + Popular Posts Widget
1,000+
安裝啟用
★★★★
4.9/5 分(17 則評價)
1839 天前
最後更新
問題解決
WordPress 3.0+ v0.10.210305 上架:2012-08-19

內容簡介

本外掛使用外部 AJAX 計數器腳本來記錄文章的瀏覽次數,是最適合快取整個頁面或使用其他快取外掛的解決方案。
此外,外掛還包含了「熱門文章」小工具,可根據瀏覽次數顯示熱門文章,並提供不同的可見性設置和預定義的佔位符,如{post_id}、{post_title}、{post_title_N}、{post_excerpt_N}、{post_author}、{post_author_link}、{permalink}、{post_date}、{thumbnail-[medium|...|64x64]} 、{post_categories}、{post_hits} 和 {post_comments_count}。
只需添加以下代碼即可在文章/頁面循環中顯示瀏覽次數: <?php echo(ajax_hits_counter_get_hits(get_the_ID())); ?> 或其等效代碼 <?= ajax_hits_counter_get_hits(get_the_ID()) ?>
您也可以使用此短代碼:[hits]。
此外,外掛還具有JavaScript回調函數(在客戶端上)來處理瀏覽次數增加的「成功」(ajaxHitsCounterSuccessCallback(xhr))和 「失敗」(ajaxHitsCounterFailedCallback(xhr)) 結果狀態。

特色

基於 AJAX 的計數器忽略大多數機械人/爬蟲
可以在任何時候將計數器重設為任何數字
外掛不需要使用任何第三方代碼和/或JavaScript框架
可排序的管理列
可以使用「熱門文章小工具」、短代碼[hits]、php代碼<?= ajax_hits_counter_get_hits(get_the_ID()) ?> 在網站的任何位置顯示
從 WP-PostViews(「工具」->「匯入」)匯入數據
兼容 W3 Cache / WP SuperCache
排除管理員的計數

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.10.210305) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「AJAX Hits Counter + Popular Posts Widget」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Plugin counts posts views (hits) by using external AJAX based counter script of this plugin, which is best solution for caching whole page or using other cache plugins.
Plugin also include widget “Popular Posts” for displaying popular posts (based on hits count) with different visibility settings and using predefined placeholders, such as {post_id}, {post_title}, {post_title_N}, {post_excerpt_N}, {post_author}, {post_author_link}, {permalink}, {post_date}, {thumbnail-[medium|...|64x64]}, {post_categories}, {post_hits} and {post_comments_count}.
You can show hits count in Posts/Pages Loop simply adding this line: or equivalent
Or you can use this shortcode: [hits].
Plugin also have JavaScript-callback function (on client) for “success” (ajaxHitsCounterSuccessCallback(xhr)) and for “failed” (ajaxHitsCounterFailedCallback(xhr)) result status of hits incrementation.
Features

AJAX based counter ignores most bots/crawlers
Ability to reset the counter to any number any time
Plugin not require using any third party code and/or JavaScript-frameworks
Sortable admin column
Can be shown anywhere on the site using “Popular Posts Widget”, shortcode [hits], php-code
Data import from WP-PostViews (“Tools”->”Import”)
W3 Cache/WP SuperCache compatible
Excluding counts from administrators

延伸相關外掛

文章
Filter
Apply Filters
Mastodon