I have little idea what I’m doing with php & css etc, but I’ve found this line of code in the index.php that adds the Comments link to each page and post.
Can anyone please tell me how to change it (add in an ‘if’ or something) so that it only displays on posts and not on pages? Even if I set each page as no comments allowed it still prints ‘Comments Off’ on the page. I want to remove this text too.
(@robpannell)
14 years, 5 months ago
I have little idea what I’m doing with php & css etc, but I’ve found this line of code in the index.php that adds the Comments link to each page and post.
<div class=”feedback”>
<?php if (is_single()) wp_link_pages(); ?>
<?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’)); ?>
</div>
Can anyone please tell me how to change it (add in an ‘if’ or something) so that it only displays on posts and not on pages? Even if I set each page as no comments allowed it still prints ‘Comments Off’ on the page. I want to remove this text too.
Thanks