WP for Wordpress

How to remove or turn off comments on wordpress pages



In many situation, we use wordpress pages as static page which is not updated in near future, for that pages we don't need comments function.

it is very simple remove comments from wordpress pages just "comment or remove" a line of code form your theme page.php.

Go to your themes page.php this page is located on themes root.

[ sometimes page.php file uses page content template something like get_template_part( 'content', 'page' ); ]

if so just go to "content-page.php" file and "comment or remove" the following code

<?php// comments_template( '', true ); ?>

That's it happy blogging :)


Responses

1 Respones to "How to remove or turn off comments on wordpress pages"

Nidhi said...

To stop comments on selected posts (or pages) in bulk: This time let's go to the All Posts section. Select all the posts for which you wish to delete comments. Then click on Bulk Actions > Edit > Apply. wordpress development company in bangalore
Wordpress Website Development Company bangalore Travel Software Development company


27 December 2018 at 03:10

Post a Comment

AddThis

 

Recent Comments

Return to top of page Copyright © 2014