How to remove "Comments Closed" to appear on your
home and pages on Wordpress blog / Removing "Comments Closed"
message to appear in wordpress
I'm currently configuring one wordpress based installation to serve
as a mini website for old fashined furniture.
By so far I was able to close the comments on the wordpress
Pages but still face huge difficulties with making the
wordpress installation to looes it's blog a like, look and feel and
look a bit like a normal website.
The major issue I faced was with removing the irritating message
Comments Closed which was appearing right after my post on
my
Home configured wordpress page.
It took me some readings online and some experimentation until I
got the solution, to make the life easier of other people who face
the
Comments Closed can't remove issue here is how I scraped
the message out:
1. Go to your wordpress install directory and look for the
wp-content/themes directory inside it select the theme which
you have selected as a default for your wordpress via the admin
page.
I assume you're using the default template and thus switch to the
directory
wp-content/themes/default , e.g.:
wp-host:~# cd
/var/www/wordpress/wp-content/themes/default
2. Inside the theme directory look up all your files for
records like:
Comments Closed
wp-host:/var/www/wordpress/wp-content/themes/default:~# grep
-rli 'Comments Closed' *
archive.php de_DE.mo es_ES.mo fr_FR.mo index.php it_IT.mo page.php
ru_RU.mo search.php single.php
As you can see in the output there are few php files which seems to
include the Comments Closed text inside them, therefore our
files of interest which needs modifications are: archive.php,
index.php, page.php, search.php and single.php
3. Open up each of the aforementioned php files and look in each
one of them for:
comments_popup_link([ some code ]);
When you stumble on the comments_popup_link function one
line before the function opening php code with <php
starts insert the code:
<?php if('open' == $post-<comment_status) :
?>
At the end of the <?php comments_popup_link([ some code
]);?> code on the next line fill in the code:
<?php endif;?>
4. Do the step 3 for all your found php files which include the
comments_popup_link function. That's it now your "Comments
Closed" message will disappear all your wordpress posts and the
wordpress install would start looking more like a
website.