How to add comments to a WordPress theme

How can I add comments to my WordPress theme. I tried <?php comment_form(); ?> but it doesn't give any output. Am I missing something?


Just add the following line

<?php comments_template(); ?>

inside your single.php where you want to add/display the comments template. This will add/include the comments.php file in the single template and make sure that comments.php is also available in your theme folder.

Also you can use Disqus wordpress plugin, it's a very nice plugin.

References: Codex and a tutorial.

Need Your Help

How do I detect a click outside an element?

javascript jquery

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.

copy tree with gradle and change structure?

gradle build copy rename

Can gradle alter the structure of the tree while copying?