Removing Comments

WordPress Pages in many ways are like posts, they can also have comments. However many people may not want comments on their page and will disable them but they end up with a comments are closed sign on their page which looks unsightly. Here is how to remove it so your pages look like other ones on your site.

1. You should already have a page.php file in your theme. If you do not then create a page.php file.

2. Remove any code from it (if you have one) and paste the code below.

<?php get_header(); ?>
<?php if(have_posts()) : ?><?php while(have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h1><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>">
<?php the_title(); ?></a></h1>
<div class="entry">
<?php the_content() ;?>
<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
<!-- <?php trackback_rdf(); ?> -->
</div>
</div>
<?php endwhile; ?>
<?php else : ?>
<div class="post">
<h2>404 Error</h2>
<div class="entry"><p>The page you are looking for is not here.</p></div>
</div>
<?php endif; ?>
</div><!-- end content -->
<?php get_footer(); ?>

Save the file and the Comments are closed should have disappeared from your WordPress pages.