A fun part of customizing WordPress themes is designing a comments format which complements the rest of the site. Here are three examples from recent projects, including code samples and downloads to the original .PSDs:
- Green Gravatars
This comment style was part of a very green-and-beige environmental blog which since received a makeover. It requires the gravatar plugin and three different images: the scanlines, the clock and the gradient, which can be exported from your .PSD.
First, we’ll need to first edit the ordered-list section of the “comments.php” template:
<ol class="commentlist"> <?php foreach ($comments as $comment) : ?> <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"> <cite> <img src="<?php gravatar("R", 32); ?>" alt="" /> <span class="author"><?php comment_author_link() ?></span><br /><span class="time"><?php comment_time() ?></span> on <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?></a> <?php edit_comment_link('edit',' ',''); ?> </cite> <div class="commenttext"><?php comment_text() ?></div> <?php if ($comment->comment_approved == '0') : ?> <em>Your comment is awaiting moderation.</em> <?php endif; ?> </li> <?php /* Changes every other comment to a different class */ $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : ''; ?> <?php endforeach; /* end for each comment */ ?> </ol>Aside from a few images, the rest of the styling is accomplished with CSS:
ol.commentlist { margin:0; padding:0; } .commentlist li { list-style:none; margin-bottom:14px; } .commentlist cite { padding: 7px; display:block; font-style:normal; background:url(http://www.yoursite.com/images/bg_comments2_cite.gif); border-top:1px solid #d6e4c1; border-bottom:1px solid #779d42; color:#596e3b; } .commentlist a:link, .commentlist a:visited { color:#596e3b; } .commentlist a:hover, .commentlist a:active { color:#8ec343; } .commentlist cite img { padding:1px; border:1px solid #aab59a; float:left; margin-right:9px; } .commentlist .author { font: small-caps bold 1.2em Georgia, "Times New Roman", Times, serif; text-decoration:underline; } .commentlist .time { background: url(http://www.yoursite.com/images/bg_clock.gif) no-repeat 1px; padding-left:13px; } .commenttext { background: #9bc561 url(http://www.yoursite.com/images/bg_comments2_text.jpg) repeat-x bottom; border-top:1px solid #c5f386; padding: 0 20px 10px 20px; color:#fafcf6; }Keep in mind, each of these examples uses ems for font sizing, so your existing CSS may need to be tinkered with to match the screenshot above.
- The Speech Bubble
I designed this comment style for my company’s website. It requires two images, the quote marks and the little curl. The relevant template code looks like this:
<ol class="commentlist"> <?php foreach ($comments as $comment) : ?> <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"> <div class="quote"><?php comment_text() ?></div> <?php if ($comment->comment_approved == '0') : ?> <em>Your comment is awaiting moderation.</em> <?php endif; ?> </li> <cite><?php comment_author_link() ?> on <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?> <?php edit_comment_link('edit',' ',''); ?></a></cite> <?php /* Changes every other comment to a different class */ $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : ''; ?> <?php endforeach; /* end for each comment */ ?> </ol>And here is the CSS:
.commentlist .quote { background:url(http://www.yoursite.com/images/bg_quote.gif) no-repeat top right; } .commentlist li { padding: 5px 18px 22px 18px; margin-top:15px; background:#454545 url(http://www.yoursite.com/images/bg_commentlist.gif) bottom no-repeat; color:#e4edee; } .commentlist cite { display:block; font-style:normal } .commentlist cite a:link, .commentlist cite a:visited { color:#88e5f0; text-decoration:none; } .commentlist cite a:hover, .commentlist cite a:active { color:#FFF; text-decoration:underline; } - Alternating Arrows
This comment styling originated from a music magazine I mocked up but never quite launched (so feel free to use it). I don’t always make use of the “.alt” class for comments, but it’s handy here for making the arrow and colors alternate. The images used are two different “paint” effects, the diagonal pattern, the chainlink and two kinds of arrows.
Here is the template code:
<ol class="commentlist"> <?php foreach ($comments as $comment) : ?> <li <?php echo $oddcomment; ?>id="comment-<?php comment_ID() ?>"> <div class="commenttext"> <cite><?php comment_author_link() ?></cite> <?php comment_text() ?> <span class="date"><img src="/images/commentlink.gif" alt="" /> <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_time() ?> on <?php comment_date('n/j/y') ?></a></span> <?php edit_comment_link('edit',' ',''); ?> </div> <?php if ($comment->comment_approved == '0') : ?> <em>Your comment is awaiting moderation.</em> <?php endif; ?> </li> <?php /* Changes every other comment to a different class */ $oddcomment = ( empty( $oddcomment ) ) ? 'class="alt" ' : '';?> <?php endforeach; /* end for each comment */ ?> </ol>And here is the CSS:
ol.commentlist { margin:0; padding:0; } .commentlist li { margin-bottom:8px; background: #60360b url(http://www.yoursite.com/images/comment_arrows.gif) bottom no-repeat; color:#FFF; list-style:none; width:413px; } .commentlist .commenttext { background:url(http://www.yoursite.com/images/bg_paint.gif) no-repeat; padding:22px 22px 50px 22px; } .commentlist cite { display:block; color:#FFF; font-weight:bold; text-transform:uppercase; font-style:normal; background:url(http://www.yoursite.com/images/bg_cite_arrows.gif) bottom repeat-x; padding-bottom:12px; font-size:1.1em; } .commentlist a:link, .commentlist a:visited { color:#fff9b9; } .commentlist a:hover, .commentlist a:active { color:#FFF; } .commentlist .date { background:#930e27; padding:3px; } li.alt { background:#836241 url(http://www.yoursite.com/images/comment_arrows_alt.gif) no-repeat bottom; } li.alt .commenttext { background:url(http://www.yoursite.com/images/bg_paint_alt.gif) no-repeat; } li.alt .date { background:#67421c; padding:3px; }
Pingback: 3 habillages pour les commentaires de votre blog à télécharger
Pingback: Rapidinhas 06-09-2007 | BrPoint
Pingback: Mastering Your WordPress Theme Hacks and Techniques
Pingback: Schweizer Wordpress Magazin » Tipp des Tages » Kommentare verschönern
Pingback: paidnetpedia.com
Pingback: SEO & Web Design » Blog Archive » Mastering Your WordPress Theme Hacks and Techniques
Pingback: SEO & Web Design » Blog Archive » Mastering Your WordPress Theme Hacks and Techniques
Pingback: Wordpress Comment Styling Round Up
Pingback: ArsGeek » Wordpress Comment Styling Round Up
Pingback: Modifiez le style de vos commentaires - blogbrothers - blogbrothers
Pingback: WordPress Comment Styling | Webmaster-Source
Pingback: Dar estilo a tus Comentarios Wordpress « Xyberneticos
Pingback: Personalizar los estilos a tus Comentarios en Wordpress — Simplemente… Nebel
Pingback: Dar estilo a tus Comentarios Wordpress | Web Grafi 2.0
Pingback: Bağlantılar #14 Temmuz 2008 | Sinerjik Günlük
Pingback: Table Of Contents Of Wordpress Tutorials, Helps, Tips and Tricks by aComment.net
Pingback: Brève Wordpress Spécial Vacances, 30+ liens utiles et indispensables !
Pingback: Quick Tips For Better WordPress Comments | Wordprezzie
Pingback: Dustin Boston » Blog Archive » Link Log for July 26th from 20:32 to 20:32
Pingback: Wordpress : donnez du style à vos commentaires
Pingback: 31og (Blog) Day 2008 | Diligent Design
Pingback: Personalizar comentarios wordpress | Blog Social
Pingback: 04.10.2008 – Schon gelesen? | QuerBlog
Pingback: 精通Wordpress系列教程- 1: 精通Wordpress主题Hacks与技巧 | å¸•å…°æ˜ åƒ
Pingback: links for 2008-10-25 through 2008-10-28 | aloha WEBLOG
Pingback: EStilos para tus comentarios Wordpress at Blog Borchani Studios
Pingback: 精通Wordpress系列教程- 1: 精通Wordpress主题Hacks与技巧 - pi4.cn å±äº‹ç½‘
Pingback: 30 Most Wanted WordPress Comments Page Hacks | instantShift
Pingback: 30 astuces pour améliorer la présentation des commentaires dans WordPress | Presse-Citron
Pingback: Complete Wordpress Theme Tutorial « Kolmex
Pingback: 30?Wordpress ?????????? - ???
Pingback: 30??????Wordpress?????
Pingback: 30???Wordpress??????? at ??????
Pingback: 30???Wordpress??????? - ????_blog
Pingback: Wordpress plugin and hacks V | Beat Fly Blog
Pingback: 30??????Wordpress????? - ????
Pingback: WordPress??? » Blog Archive » ?????Wordpress?????
Pingback: 30??????Wordpress????? - ????
Pingback: 250 Wordpress Tutorials
Pingback: 10 WordPress Tips & Tricks for Your Comment Page | Lists | Tutorial Blog
Pingback: i P r o n e t S t u d i o » بیش از 50 مرجع برای یادگیری و استفاده بهتر از وردپرس
Pingback: 10 WordPress Tips & Tricks for Your Comment Page | New Techs
Pingback: 10 WordPress Tips & Tricks for Your Comment Page | Free Tutorial 4 All
Pingback: برگزار کننده مسابقات آنلاین بیش از 50 مرجع برای یادگیری و استفاده بهتر از وردپرس | وبلاگ تهران خريد
Pingback: Link FA | لینک فا » بیش از 50 مرجع برای یادگیری و استفاده بهتر از وردپرس
Pingback: 70 Very Useful Wordpress Hacks & Tricks » De Web Times - Sharing Useful Resources.
Pingback: Top 10 Best Wordpress Tweaking Tutorials | Huzzer Magazine
Pingback: 40+ Awesome Tutorials and Techniques For WordPress Theme Developers | huibit05.com
Pingback: Anonymous
Pingback: 250 Wordpress Tutoriels et liens pour tous | Guppytrucs Freeware
Pingback: US Want - Your Blogs, Social Network, Search Engine for Drivers, UserGuide, Vids, Images, Tutorials
Pingback: Top 10 Best Wordpress Tweaking Tutorials | Huzzer Magazine
Pingback: 33 Most Useful Worpdress Comments Page Hacks - Themeflash : One Stop For All Your Web Resources
Pingback: Debbie’s calm in September, very calm | A Place Of Calm
Pingback: Blog – Velagapati - 300+ Resources to Help You Become a WordPress Expert
Pingback: Blog – Velagapati - 300+ Resources to Help You Become a WordPress Expert
Pingback: Blog – Velagapati - 300+ Resources to Help You Become a WordPress Expert
Pingback: Styling And Highlighting WordPress Comments | Scrapur.com
Pingback: Wordpress评论(留言)的30个技巧 | WordPress:最流行的开源博客程序
Pingback: بیش از 50 مرجع برای یادگیری و استفاده بهتر از وردپرس
Pingback: WordPress Tutorials and Tips: Part One
Pingback: The Ultimate Wordpress Developer Toolbox | tripwire magazine
Pingback: WordPress 300+ Collection of Amazing Resources | Amazing and Inspiring Design
Pingback: 300+ Resources to Help You Become a WordPress Expert « eBSPAD
Pingback: 300+ Resources to Help You Become a WordPress Expert | LeVoltz - iPhone Games, Engineering Projects, Wordpress Themes
Pingback: 100+ Massive Wordpress Tutorial Collection | tripwire magazine
Pingback: PSD to Wordpress Series Part 3: Final Tutorial | Webdevtuts
Pingback: Comment Design: Considerations, Best Practices and Examples | Inspiration
Pingback: Comment Design: Considerations, Best Practices and Examples | Lunch Time Laugh
Pingback: Comment Design: Considerations, Best Practices and Examples | Mac Bargains
Pingback: Table Of Contents Of Wordpress Tutorials, Helps, Tips and Tricks | DevWebPro
Pingback: Comment Design: Considerations, Best Practices and Examples | Fulldigi
Pingback: Wordpress Tutorial – Πως να φτιάξεις το δικό σου wordpress theme! | inBlog.gr – Webmaster, SEO & Internet Blog
Pingback: 13 Useful Code Snippets for WordPress Development | Web Design Ledger
Pingback: (摘)精通Wordpress系列教程一 « 李小西的博客
Pingback: 14 Tips voor Blog Comment Design
Pingback: WordPress Theme from Scratch – Day 3: HTML to WordPress | AEXT.NET
Pingback: 300多种可帮你成为WordPress专家的资源 | 上海网站建设,上海网络公司
Pingback: wordpress主题的制作和使用技巧 | 一起走过的日子
Pingback: WordPress Themes — Pearsonified » XMM.IR
Pingback: 54 Awesome Tutorials To Satisfy The Appetite Of Any Web Developer | Tutorials | PelFusion.com
Pingback: Wordpress – Recursos para Webmasters | Tienda virtual online. Diseño de paginas web. Posicionamiento Seo y Sem
Pingback: 65 Of The Best WordPress Tutorials « Junkiee.Net
Pingback: 9 Wordpress Tricks and Tutorials « Er.Krushna Chandra Muni :: Professional Web Developer | Website Design Orissa | Website Design Bhubaneswar | Website Design India | Website Design New Zealand | Website Design Auckland
Pingback: 54 Awesome Tutorials for Any Web Developer | The Technology Reports
Pingback: 13 Useful Code Snippets for WordPress Development | WebsGeek
Pingback: MimboCake | KiloVox
Pingback: WordPress Expert Resources, Wordpress Plugins, Wordpress Tutorials
Pingback: wordpress 资源收藏
Pingback: 300 resources to help you master WordPress « Er.Krushna Chandra Muni :: Professional Web Developer | Website Design Orissa | Website Design Bhubaneswar | Website Design India | Website Design New Zealand | Website Design Auckland
Pingback: Sirtin » Main dans le cambouis
Pingback: Ultimate Wordpress tutorials, themes and guides | Kroro.de - Robert Kropf
Pingback: wordpress hacks 技巧汇总 - 流年观影
Pingback: The Ultimate Roundup of WordPress Tutorials, Themes and Guides | Private Gardens
Pingback: 30 Wordpress Yorum Sayfası Düzenlemesi | Sorbize
Pingback: 300+ Resources to Help You Become a WordPress Expert « Flash Criminals
Pingback: 14 Tips voor Blog Comment Design | SENTEL.NL
Pingback: 60+ Awesome WordPress Tutorials | The Best WP Themes Online
Pingback: 250+ Resources to Help You Become a WordPress Expert | How 2 WordPress
Pingback: Comment Design: Considerations, Best Practices and Examples | WordPress Identity
Pingback: 精通Wordpress系列教程- 1: 精通Wordpress主题Hacks与技巧 - 天津SEO
Pingback: 300多种可帮你成为WordPress专家的资源 | 眉山SEO-网络赚钱项目★网络创业培训★睿智推广
Pingback: 20 Very Useful Comment Page Hacks for WordPess Users | blueblots.com
Pingback: The complete guide to styling your WordPress comments « Web Hosting Blog | Heart Internet Official Blog
Pingback: WordPress Tutorials and Tips: Part One | Radical Development
Pingback: 精通Wordpress主题Hacks与技巧
Pingback: 40+ Awesome Tutorials and Techniques For WordPress Theme Developers — tripwire magazine
Pingback: 50 полезных уроков для веб разработчика (часть 1)
Pingback: MsKcR | Bilgi Paylaşım Portalı » Blog » Wordpress Yorum Sayfası Eklentileri
Pingback: 9 Best Wordpress Tricks and Tutorials for Designers
Pingback: 精通Wordpress教程: 精通Wordpress主题Hacks与技巧
Pingback: 300多种可帮你成为WordPress专家的资源 _ 网赚_网络赚钱项目_网上兼职赚钱_SEO培训★月赚万元★金苹果网
Pingback: 60 Most Wanted WordPress Hacks | stylishwebdesigner
Pingback: 60+ Awesome WordPress Tutorials » Themetation
Pingback: worldpress 教程大全 - wordpress-前沿体验frontexp.com
Pingback: Wordpress教程大全 | 得失之间,谈笑自若
Pingback: 60+ Awesome WordPress Tutorials | All Templates
Pingback: PSD to WordPress Series Part 3: Final Tutorial | WebDino.net
Pingback: Improve the user experience for comments | ButlerBlog
Pingback: Noe Garcia:Blog » 22 Handy Wordpress Tuts and Hacks