不用插件加入 Gravatar 头像
在 comments 模板找到下面这句
<li class=”<?php echo $oddcomment; ?>” id=”comment-< ?php comment_ID() ?>”></li>
加入下面代码
<?php if(!empty($comment -> comment_author_email)) {
$md5 = md5($comment -> comment_author_email);
$default = urlencode('默认头像的地址');
echo "<img src='http://www.gravatar.com/avatar.php?gravatar_id=$md5&size=20&default=$default' alt='' />";
}
?>
调整 默认头像的地址 为你站点默认头像图片的地址。
显示你自己的 “更多内容”
打开 index.php 或者其它 home php,找到
<?php the_content(__(’Read more’));?>
改为
<?php the_content(”更多内容” . the_title(”,”,false), 0); ?>
字符串过滤
<?php echo wp_specialchars($s, 1); ?>
避免蜘蛛抓取 archive 页面
在 header.php 的 head 区域加入
<?php if(is_archive()) { ?><meta name=”robots” content=”noindex”><?php } ?>
基本参考
- WordPress Documentation (Codex)
- WordPress.org Plugins Database
- WordPress.net Themes Database / Viewer
- WordPress Support Forums
- Wpdesigner Theme Support
相关参考
- WordPress Cheat Sheets Summary by Kahi.cz
- Mashable WordPress Resource Lists
- Weblog Tools Collection Tips and Tutorials
- WP Bits WordPress Tips
- Binary Moon Tips
- WordPress Plugins & Tutorials at Smashing Magazine
- WordPress Garage – WordPress as CMS tips
- The Tamba2 WordPress Guides by Podz
Individual Plugin Authors
高级技巧
- Customize Your WordPress Login – David Airey shows you how to personalize your login page.
- How to Write A Plugin – A series of twelve entries on how to write your first WordPress plugin, from DevLounge.
- Integrating A Forum With WordPress – Learn how to mesh your WordPress and vBulletin, SMF, bbPress, or Vanilla and etcetera.




