I am trying to use the code below in my comments.php file to output nothing on a page when comments are closed, and ‘Comments are closed’ on posts when comments are closed.
<?php if(is_page()) : ?>
<!-- Is a page so show nothing -->
<?php else : ?>
<p class="nocomments">Comments are closed.</p>
<?php endif; ?>
(@marzar00)
16 years, 5 months ago
G’day all,
I am trying to use the code below in my comments.php file to output nothing on a page when comments are closed, and ‘Comments are closed’ on posts when comments are closed.
Any help is much appreciated