[WP] WP-GoogleStats
眼尖的人應該可以發現首頁或每篇文章底端,都有一個類似 Googlebot visited this page at 9/22, 8:55 pm 的東西,這是使用 WP-GoogleStats 這個 plugin 的效果,可以顯示 Googlebot 訪問 blog 的頻率、次數、以及最後到訪的時間。裝了有一段時間,有人在留言板問了,所以我介紹一下簡易的安裝步驟。
step 1.
於資料庫中建立一個新的 table,
CREATE TABLE `wp_googlestats` (
`page` varchar(100) NOT NULL DEFAULT '',
`lastvisit` int(11) NOT NULL DEFAULT '0',
`frequency` int(11) NOT NULL DEFAULT '0',
`visits` int(11) NOT NULL DEFAULT '0',
`timestamp` timestamp(14) NOT NULL,
KEY `page` (`page`)
)
step 2.
於 WP-GoogleStats 頁面下載 .phps 檔案並重新命名為 .php (mirror),將檔案放至 /wp-content/plugins/,於控制後台啟動。
step 3.
編輯 theme 底下的 footer.php,在 <div id="footer"> 範圍內任一地方加入
<?php if (function_exists ('wp_ftr_googlestats')) wp_ftr_googlestats('l, F j, Y'); ?>
'l, F j, Y' 為時間顯示的格式,可以參考 PHP.net 的 date 頁面。存檔後即可在首頁或文章底端看到效果。




September 23rd, 2005 at 10:10 pm
WordPress Plugin: GoogleStats
WP-GoogleStats,用来显示Googlebog访问你Blog的频率、次数、以及最后的访问时间,比如在文章下面显示Googlebot visited this page at 9/22, 8:55 pm这样的效果。
via: hsuyo BLOG
…
October 27th, 2005 at 11:32 am
[…] hsuyo blog ‘WP 速記’ […]
December 31st, 2005 at 1:55 pm
[…] via: hsuyo BLOG bot 统计 google googlebot stats […]