by

WordPress Help : How to Disable Comment Feature in WordPress

May 2, 2011 in Computer & Internet

Last week , I visited a Blog where a commenter asked the Blog- Admin how to block comment feature in pages .Actually the commenter runs WordPress as CMS ( Content Management System ) and she didn’t want the comment feature in her pages . However , I didn’t find the answer there provided by the Admin of the site.

So , I tried to do it myself and tried to find a better solution for her and for many others who seek the answer and who didn’t find the answer yet. After a dedicated effort , I just got the answer and this trick is applicable to all WordPress Themes.

Personally , I will recommend you to keep the comment features in your Blogs as it increases inter-action with your visitors . However , if you really don’t want this feature , you just do it as I am telling you .

How to disable comment features in WordPress Pages?

Just login to your Dashboard and go to Editor option situated in the left hand side in Appearance Panel. Click on Editor Option and then click on ‘page.php‘ which is situated in the right side of your screen. You just need to delete a small line in the ‘page.php‘ file .

Actually this line of code calls the comment feature in WordPress and If you delete the code , the comment feature will be disabled at once . Similarly ,if you want to disable this feature in posts , you just need to edit the ‘single.php‘ and delete the same code as you find it in ‘page.php’. This trick will help you to disable this feature from both of pages and posts.

Just Delete The Code : <?php comments_template( ”, true ); ?>

Don’t forget to save the code in a text file so that you can re-instate the feature in future if you want so.

Bookmark and Share