首页 » WordPress » 区分作者和其他人的留言

区分作者和其他人的留言

September 16th, 2008 Denis

当你的博客有多个作者的时候,你可能需要把作者的留言样式定义的不一样,下面就是我们怎么实现的:

<li class="<?php if ($comment->comment_author_email == "authorname@domain.com") echo 'author'; else if ($comment->comment_author_email == "anotherauthorname@domain.com") echo 'author2'; else if ($comment->comment_author_email == "thirdauthorname@domain.com") echo 'author3'; else echo $oddcomment; ?> item" id="comment-<?php comment_ID() ?>">

翻译自:Most Desired WordPress Hacks: 11 Common Requests and Fixes 第十点。

8c1c873d

作者:Denis
原文链接:区分作者和其他人的留言

标签:

分享到 Twitter 分享到 Twitter Delicious 收藏到 Delicious 分享到 Google Reader 分享到 Google Reader 分享到 FriendFeed 分享到 FriendFeed

10 条评论 添加你的评论

发表评论

你必须 登陆 之后才能留言。你可以使用以下方式快速登陆我爱水煮鱼:

你也可选择直接在本站 注册


在日志下显示作者简介 在博客上显示 Twitter 消息


赞助商

 (mt) Media Temple 长期承接 WordPress 项目 WordPress主机合租 用网页模板,当然要选TemplateMonster China 免費資源網路社群 freegroup.org http://p6p9.com/ 在我爱水煮鱼投放广告位

本站推荐

快速导航