這個插件安裝很久了,
不過之前是安裝postviews 而以,
但是似乎他無法在前台顯示人氣統計,
所以找了一下換成了Postviews plus
然後在修改一下,終於可以在前台顯示文章閱讀人氣了 :P
以下引用作者官網說明
參考資料: ‧幻想的世界 ‧重灌狂人 ‧Postviews plus函數說明
簡介 這是 WP-PostViews 的強化版本。讓你的瀏覽數可以區分使用者或機器人。 WordPress 官方網站外掛目錄中的本程式。 使用範例 參考本網站的文章。 下載 * WP-PostViews Plus 1.1.3 (WordPress 2.3.x 版本適用) * WP-PostViews Plus 1.0.13 (WordPress 2.1.x 與 2.2.x 版本適用) * WP-PostViews Plus 1.0.6 (WordPress 2.0.x 版本適用) 安裝方法 1. 上傳檔案 postviews_plus 資料夾到 wp-content/plugins 資料夾。 註: 解壓縮後看到的 .po 檔並不需要上傳,而 .mo 檔請選擇符合你的語系。 2. 啟用 WP-PostViews Plus 外掛。 3. 將顯示函數添加到你的樣版檔。函數說明。 更新方法 * 原本使用 WP-PostViews 1.0.x 者 1. 停用 WP-PostViews 外掛 2. 刪除 postviews.php 檔案,應該位於 wp-content/plugins 資料夾 3. 上傳檔案 postviews_plus 資料夾到 wp-content/plugins 資料夾 註: 解壓縮後看到的 .po 檔並不需要上傳,而 .mo 檔請選擇符合你的語系 4. 啟用 WP-PostViews Plus 外掛 * 原本使用 WP-PostViews Plus 1.0.0~1.0.8 者 1. 停用 WP-PostViews Plus 外掛 2. 刪除 postviews.php 檔案,應該位於 wp-content/plugins 資料夾 3. 上傳檔案 postviews_plus 資料夾到 wp-content/plugins 資料夾 註: 解壓縮後看到的 .po 檔並不需要上傳,而 .mo 檔請選擇符合你的語系 4. 啟用 WP-PostViews Plus 外掛 * 原本使用 WP-PostViews Plus 1.0.9~1.1.x 者 1. 上傳檔案 postviews_plus 資料夾到 wp-content/plugins 資料夾 註: 解壓縮後看到的 .po 檔並不需要上傳,而 .mo 檔請選擇符合你的語系修改模板部分, 修改index.php、single.php、page.php (視個人需要) 搜尋
<span class="comments"></span></blockquote>後面加入
<!--postview start--> 人氣:(<?php the_views(')', true); ?> <!--postview end-->也可以視個人需要修改至相關位置。
參考資料: ‧幻想的世界 ‧重灌狂人 ‧Postviews plus函數說明

請先 登入 以發表留言。