Get to know every line of your comments.php WordPress theme file

There is one WordPress theme file that I almost never touch when working on a theme: comments.php. I usually style WordPress comments via the CSS sheet, and that’s that.

Well, there’s a lot you can do to customize and extend WordPress comments if you just know how. Nettuts has published a comprehensive tutorial on how the comments.php file works, and what every line of code does. The tutorial also explains how to add extra goodies to your comments, like Gravatars, comment numbers, comment links, alternating colors (which we’ve discussed here), displaying the HTML tags users can use in the comments text box, and displaying a link to the comments RSS feed. The tutorial did not discuss how to give each comment its own link, a tip that I find particularly handy for referring to specific comments.

Check out this tutorial if you want to strengthen your relationship with your WordPress comments.

Miriam is the friendly CEO of illuminea, a WordPress design and development agency, and Strattic, a static publishing platform for Open Source CMSs. Miriam is a huge fan of WordPress and has been using it for over ten years. In addition, Miriam has organized the past five local Israeli WordCamp conferences.

About WPGarage

This is where Rebecca and Miriam from illuminea (and sometimes others) document things they've learned about WordPress. Even after nine years in the field, we're always learning new things about WordPress. Hope this helps you too.