If you’re using WordPress as a website platform instead of a blogging engine, you might want to disable comments to help make your WordPress website look more professional. Here’s a quick tip on how to do it.
Method One: Disable Comments in the WordPress Admin
Each page and post in WordPress has the ability to disable comments individually by simply clicking the Discussion tab and changing the Allow Comments option for the post.
WordPress Discussion Tab Remove Comments from WordPressYou can also change this feature globally by accessing your WordPress administration screen and changing the global settings in Settings > Discussion and clicking two similar options. However, on most themes, changing the global setting or the individual settings will often result in the text “Comments Closed” (or something similar) appearing at the bottom of each page/post.
To get rid of the Comments Closed phrase, you’ll need to find and edit your theme files. This can be done using either an FTP client or the build-in theme editors (Appearance > Editor). Look for your comments.php file and in it you’ll likely find the line displaying your closed text.
For example in the popular Twenty Ten theme included in WordPress 3.1 the line is displayed near the bottom of the file (line 72 to be exact) and looks like this:
<?php _e( ‘Comments are closed.’, ‘twentyten’ ); ?>
Removing the line in it’s entirety will remove the text from your website.
Method Two: Removing the comments from your theme files
An alternative method (the one that I prefer) is to simply remove the comments from your website altogether. The option will still appear in the WordPress admin but, with theme files, it’s possible to disable them from appearing anywhere on your website. Just remove the comment reference from your code.
There are two files in which comments commonly appear: the single.php which is used for blog posts and page.php which is used when a page is displayed. If you’re using a more modern theme, you may have a loop.php file which is called by each of these files and will contain the reference instead. Opening each of these files will reveal a piece of code similar to which, if removed, will stop WordPress from calling the comments for all pages and posts.