Archive

Posts Tagged ‘WordPress’

How to include comments on WordPress Index.php Page

October 24th, 2009 No comments

I wanted comments to appear on this blog right after the post.

I thought I could just add: <?php comments_template();  ?> but I was wrong.

The correct syntax is:

<?php
$withcomments = 1;
comments_template();
?>

Also, after embedding the comments in the index page, I removed all the tabindex properties
from the comments form, because otherwise when the comments form is repeated, the tabbing
gets out of whack.

I embed it right after the <div class=”post”> tag.

Here’s a screen shot of the result:

Comments on Index Page

<?php

$withcomments

= 1;

comments_template();

?

Tags: ,