108 PART II • Designing and Developing WordPress Themes
◾ Proper spacing between comments, along with alternating colors or dividing lines, helps
provide visual separation. Any method that accomplishes this separation is fine.
◾ The comment author must be evident.
◾ The Post Comment form should be obvious to use, be properly tabbed, and use a
readable font in a decent size. Think about it: If you want the readers to write long and
insightful comments, you should make it as easy on them as possible to do so.
A few less essential points come to mind as well:
◾ What’s the comment policy? Link to it or put it in small print along with the Post
Comment button.
◾ Do you allow HTML code? If so, which tags are acceptable?
◾ Do the comments go into moderation before publication? If they do, you should let the
readers know or at least output a big note when a posted comment goes into moderation.
◾ Do you require sign-up and/or login to comment? Then make that process as simple and
obvious as possible.
Think the comment functionality through, and you’ll be fine. You’ll also have a much easier
time designing it, and possibly altering the functionality when required as well.
THREADED COMMENTS
Threaded comments were introduced as early as WordPress 2.7 and require activation from
within the WordPress admin interface, under Settings ➪ Discussion. Any theme that uses the
proper template tag for listing the comments, which is wp_list_comments(), supports
threaded comments should you want them.
If you activate threaded comments, you’ll get a Reply link at the end of each comment.
Clicking it will alter the Post Comment section somewhat and add a Cancel Reply link as well.
This is all built-in stuff, so you needn’t worry about it.
What you do need to consider, however, is the following:
◾ How deep will the threaded comments go? This is an admin setting, and you need to
make sure that you support it within your design.
◾ You need to ensure that the Reply link is properly styled.
◾ You need to ensure that the Cancel Reply link is properly styled as well.
Replies to comments end up within that particular comment’s li, inside a ul with the class
children. The comment hierarchy is basically like this (with some code cut out to illustrate
the point):
<li>
<!-- The top level comment content -->
<ul class="children">
<li>