‘You need to edit the page.php file for your theme and insert the following: <?php comments_template(); ?>
In the default theme it slips in best just before the close of the <div id=”content” class=”narrowcolumn”> tag on line 17 (I’m looking at theme version 1.6).
That’s all there is to it. You might also want to edit the comments.php file of same theme and add <?php if (!is_page()) { ?> before the line that reads <!– If comments are closed. –> and <?php } ?> after it. (It’s around line 57/58, again in default theme version 1.6.) This’ll stop the “Comments are closed” message from appearing on pages which to me doesn’t quite fit given the context.
Hope that helps someone given this was 2 months ago. Took 2 minutes of my time and is a darn sight lot more useful than the earlier “It’s easy but I ain’t gonna share” attitudes’
The problem is the comments are closed part (shouldn’t display on page) doesn’t work with my theme. I want to remove the comments section (everything box, and text) off of pages I set “don’t allow comments”
Comments.php file code:
[huge chunk of code moderated – please use a pastebin]
Pukka
Just started to copy my old php mysql driven website with all that legacy code…. over to wordpress and this came up in the google search and works!
Now all i gotta do is change the layout of the comments reply.
Cheers fella
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘Comments on pages’ is closed to new replies.
(@shackle)
16 years, 10 months ago
Followed this guide for adding comments on pages (site: http://www.tylertucker.com):
‘You need to edit the page.php file for your theme and insert the following: <?php comments_template(); ?>
In the default theme it slips in best just before the close of the <div id=”content” class=”narrowcolumn”> tag on line 17 (I’m looking at theme version 1.6).
That’s all there is to it. You might also want to edit the comments.php file of same theme and add <?php if (!is_page()) { ?> before the line that reads <!– If comments are closed. –> and <?php } ?> after it. (It’s around line 57/58, again in default theme version 1.6.) This’ll stop the “Comments are closed” message from appearing on pages which to me doesn’t quite fit given the context.
Hope that helps someone given this was 2 months ago. Took 2 minutes of my time and is a darn sight lot more useful than the earlier “It’s easy but I ain’t gonna share” attitudes’
The problem is the comments are closed part (shouldn’t display on page) doesn’t work with my theme. I want to remove the comments section (everything box, and text) off of pages I set “don’t allow comments”
Comments.php file code:
[huge chunk of code moderated – please use a pastebin]