I would like to add comments to my single.php file. My custom theme is "hand built" and I haven't found the proper code needed to add this functionality. Anyone have the quick and dirty on how to add such a thing?

  • Take a look at TwentyTen/Eleven as reference.
    – kaiser
    Apr 26 '12 at 15:04

While much of comments implementation became simpler in modern WP versions, it still isn't quite make-comments-happen button.

You will need to put together this part of template, most of related functionality is handled by:

Check native WP themes for complete start to end implementation, although they tend to be a little bulky.

  • Thanks Rarst. I'm digesting the code and trying to cut the fat. Thanks for your help. And @kaiser, thanks for the initial direction.
    – bkbarton
    Apr 26 '12 at 15:32

in your single.php template use:


alternatively to working with the comments.php of the default theme, there is still a basic comments.php in this location /wp-includes/theme-compat/comments.php (although it does not have comment_form() implemented).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.