WordPress2.7即將到來,11/10將會開放下載,在Comment的部分因為版本的關係所以要調整,所有的佈景主題都要進行修改,這………..囧rz,改版就改版,稿的所有佈景都要改ˋ ˊ 。 國外已經有些解決的方式出來。 做法國外有介紹了,艾德簡單用中文說一下 @@ 先準備好2.6x版本的comments.php,然後將檔案名稱改成legacy.comments.php 再來是建立2.7版本的comments檔,存成檔案comments.php 接下來是要判斷WordPress的版本,不過這是不是用版本編號來判斷,而是以函數的存在與否來判斷。 這時請打開function.php 在裡面加上 <?php add_filter(‘comments_template’, ‘legacy_comments’); function legacy_comments($file) {     if(!function_exists(‘wp_list_comments’)) : // WP 2.7-only check        $file = TEMPLATEPATH . ‘/legacy.comments.php’;    endif;     return $file;} ?> 這樣應該就可以吧 @@,不過還是要等2.7出來後測試才知道。 其他相關資訊可以參考國外網站: http://justintadlock.com/archives/2008/11/01/making-your-themes-comments-compatible-with-wordpress-27-and-earlier-versions http://ottodestruct.com/blog/2008/09/29/wordpress-27-comments-enhancements/