Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialshareyourpeace
3,244 PointsWhen I comment out the php code to remove comments, the comment_template (); the comment text box is still visible.
In page.php,
<?php // comments_ template(); ?>
But the comment text box is still visible.
I then deleted the entire line of code but the comment text box is still visible.
2 Answers
Pol Martin
8,200 PointsHi there,
if you removed the whole line and comments still appear, it is most likely that page.php is not the template used for this particular case.
It may be using a more specific template instead of the generic page.php
Check the Wordpress Codex for more info about Template Hierarchy:
Josh Lipton
13,255 PointsI had the same problem. I was able to apply the edit to the file single.php to get the comments to stop showing.
shareyourpeace
3,244 Pointsshareyourpeace
3,244 PointsThanks Pol. I will try this.