在模板的comments.php中,找到關(guān)于"回復(fù)"的相應(yīng)代碼位置,在其后添加如下代碼
  1. <?php
  2. $url?=?get_bloginfo('url');
  3. if?(current_user_can('edit_post',?$post->ID)){
  4. echo?'<a?class="delete-post"?href="";
  5. echo?wp_nonce_url("$url/wp-admin/post.php?action=delete&post=$id",?'delete-post_'.?$post->ID);
  6. echo?'">刪除</a>';
  7. }
  8. ?>
當(dāng)然,你也可以插入到其他你想要的位置. 要注意,comments.php必須另存為utf-8的格式,否則中文輸出會(huì)亂碼