Showing comments on homepage with $withcomments – not working for me
-
Hi! After much searching and teeth-gnashing, I thought I’d found the solution to my issue of not being able to make the comments box appear on the homepage.
The solution appears to be to add this code:
<?php $withcomments = true; comments_template();?>
Instead of just
<?php comments_template(); ?>
…to home.php .
This supposedly gets around a built-in block on showing comments on the homepage which is written into wp-includes/comment-template.php.
However, when I add this to the theme I’m working with, it only works for the first post on my homepage, then on the second I get an error:
Fatal error: Cannot redeclare k2_comment_type_detection() (previously declared in /home/brainedx/public_html/wordpress/wp-content/themes/cutline/comments.php:15) in /home/brainedx/public_html/wordpress/wp-content/themes/cutline/comments.php on line 15
And the rest of the page including the sidebar fails to load.
Kind of stymied on this one.
Can it be so difficult to have the comments entry field show on the homepage? He asked rhetorically…
Any help much appreciated. Thanks!
Adam
- The topic ‘Showing comments on homepage with $withcomments – not working for me’ is closed to new replies.