UPDATED! August 5 2012 – I put together a quick video because some people were having trouble working out how to edit php files. See end of post for vid.
This is an issue that has irked many a website designer over time. WordPress is a very flexible and powerful system but, let’s face it, the software was designed by and for blogger fans. And what blogger fans and other “social networking tragics” love more than anything in the world is interaction.
And who can blame them!
But many of us have clients who don’t want or need people commenting on every page and post of their site. So the wonderful WordPress commenting feature becomes a pain in the bottom instead.
Sure, you can “turn off” commenting but you’re still stuck with a pointless confusing statement at the end of every page and post on your clients site saying “Comments are closed” or something similar.
Getting rid of that statement is possible but, unfortunately, a confusing process because each theme or template used by WordPress has the bit that’s responsible placed in different files.
So, you might read somewhere that you just go to “singlepost.php” and delete a line but discover your theme doesn’t have any such file.
Hopefully, this post will help you sort out what in the heck is going on for at least some templates (themes) you and your clients are using.
Here (in no particular order) are some different methods for removing the “comments are closed” text from a WordPress site. Check your theme for relevant files and then the stated lines within the files. If you can’t find the files and or lines for one solution, try one of the others. Somewhere in here you will hopefully find the right answer for your situation.
Note that these suggestions all assume you’ve already turned off commenting in your site by going into Settings > Discussion in your Admin panel and unchecking the “Allow people to post comments on the article” box.
1. Using the “singlepost.php” and/or “page.php” and/or “”singlepage.php” files
If your theme has one or more of these files included, look for the line
< ? php comments_template(); ? >
Once you’ve found it you have 2 options for stopping it from working.
a) Delete it (not recommended but lots of people do it)
b) Do what’s called “comment it out”. This means you use a bit of simple code to hide it so it won’t work. But if you have any problems it’s easy to remove the “commented out” symbols and restore it back to it’s original state. I just find it a safer method than blithely deleting stuff from the code base.
“Commenting out” looks like this
/*Bit you want to hide*/
Everything between the /* and */ will be ignored as if it’s not there.
2. Using the “comments.php”
In some themes (eg the lovely Amazing Grace) the solution is in the file called “comments.php”. Find the bit that looks something like this:
php else : // comments are closed ?
!– If comments are closed. –>
p class=”nocomments”>Comments are closed</p>
And remove the text that is displaying on your site (the words at the very end in bold). If you’re not sure which bit is the text try putting in a tilda ~ and see if it shows up on the site. If so, you know you have your culprit and can delete the text for display there. Make sure you leave everything else exactly as it is.
If this option is available to you in your theme praise the designer because it means, if you want to, you can still have comments activated on some of your posts. It doesn’t remove anything except one line of ordinary text that usually displays on your site.
3. Using comments.php part 2 (Leptonhead’s solution)
If you can’t find the above line in your comments.php try leptonhead’s suggestion:
1) Go inside the theme folder through FTP and open comments.php
2) Look in comments.php for something that looks like this:
[div class="messagebox"]
[?php _e('Comments are closed.', 'inove'); ?]
[/div]
NB “inove” is the name of the theme, so if you are using another theme look for the name of your theme instead. I know that this bit can also be found in the Options theme and Structure theme but not in the Default or Classic theme.
3) Delete/comment out that entire block.
Thanks leptonhead!!
3. Delete the comments.php entirely
I haven’t ever tried this but I have seen it suggested. It seems a bit drastic to me. I will let you know if it works when I get a chance to experiment with it.
Anyone got other suggestions?
4. CSS
And another suggestion from Shu and Jasonfor those who are comfortable using CSS (thanks both of you!)
A “safer” and simpler solution is to hide the text using css:
.nocomments { display:none; }
Please read comments for more information on above solutions – your question might already be answered!
Short video for those of you who don’t know how to edit the files for your theme. Hope it helps you. Let me know!!
It is really helpful for me; I have a problem of inadequate comments on my pages and many of them gave same comment regularly. Going to try it, thank you for suggestions.
Hi Anne. You might need to set up some spam protection by the sounds of things. A lot of spammers have an automatic spam system that will post repeat comments. Cheers and glad to have helped
Thank you. Thank you. THANK YOU! I’m an Art Director and have no experience with coding. Your explanation was perfect!
LOL YOu’re welcome!! SOrry I didn’t approve this earlier – it accidentally got sent to spam along with a few others.
The last thing a blogowner is waiting for is a whole tornado of comments that have nothing to do with the subject and are equivalent to spam. So yeah I totally understand your issue. Adjusting things like that should be made more easily and not a whole hassle to get those things arranged. Let’s hope they work it out sooner or later!
Yep that would be nice eh!!
The “One Click” plugin is interesting but doesn’t solve the problem.
I have been comparing answers on various sites and have had basically no luck. I was optimistic about the css suggestion but couldn’t figure that out (and I note that there are no replies on this site to people asking how that works!).
MY discovery, and I am AMAZED by how COOL this is – is that the theme I’m using “Atahualpa” (very popular as I understand), has the ability to change this or turn it off EASILY.
Under the theme settings you will see a section called “Commenting.” The solution was to remove the offending code by simply removing the text from the “Comments are closed text” field in the settings. VERY NICE! (says Borat).
Is that cool or what? By the way, Atahualpa takes some tweaking but is completely adaptable to your own vision / design. Try it out.
Hi mike
Thanks for commenting. Sorry you couldn’t get anything to work. What couldn’t you figure out about the CSS suggestion? Mind you, I’m no great expert on CSS either but I might be able to come up with something if I knew a bit more about what problem you’re having with it. I have use Atahualpa and remember liking it at first but then deciding it wasn’t for me – too many options and whatnot and it felt like I had little understanding of what was going on with my site design. I can’t explain it better than that. Nothing wrong with the theme – just not for me. I prefer to try and use a very simple template and work stuff out for myself so that I have control over what’s going on with my site and also learn as much as I can along the way. But for anyone who just wants to get a plug and play site up and running it might be useful. Thanks again for your comment – nice site you got there!
Thank you, thank you,thank you!!! Just what I was looking for!
“Commented them out” and they’re gone! Awesome!
Also check your plugins, I’ve just spend a few hours trying to find where “Comments Closed” was being generated. It turned out to be the Facebook Comments for WordPress plugin.
Good tip thanks!!!
The other way is to access the database and change comment_status and ping_status field in wp_posts to open for preferred posts.
Great suggestion for people willing to mess about in their databases! Thank you for sharing that.
But does this work with pages? This is where I’m having the issue, not the posts, but the pages.
Never mind. I wound up removing in my page.php file. It doesn’t mess with the posts, only the pages.
Glad you got it sorted
Apologies to some commentors from the past month or so – you’re comments got lost in the spam filter so I didn’t notice them till today. Have now published them all (except the spam ones – obviously LOL) Cheers!
Under the theme settings you will see a section called “Commenting.” The solution was to remove the offending code by simply removing the text from the “Comments are closed text” field in the settings. VERY NICE! (says Borat).
Awesome Advice! Thanks so much for the post. It just so happens I was using the Inove theme anyway and this answered my question exactly! I did however have problems hiding the code with the /**/ function so I ended up using comment tags instead to hide the comment message box. Thanks again!
-Andrew
Thank You. I tried everything everyone suggested to get ‘comments are closed’ off my pages and finally got it to work with the CSS suggestion. Great!
I’ve just this minute dashed out a plug in that uses the css solution (I dislike anything that involves editing themes since they tend to get overwritten on changes and updates and you have to remember every bit of bespoking you have done) and it seems to work a treat. If anyone were interested I could upload it to the wordpress plugin repository later
In my theme I changed “on” to “off” on page.php and it worked wonders.
Great post – it helped me find the code to edit with other wording that I wasn’t able to from Themes – Edit. It was visuable there or when viewing in my FTP for whatever reasons. So thanks. Other techniques provided on the WWW broke my theme.
I just released a plugin that will remove the ‘Comments are closed.’ text. It does this by filtering gettext and hence supports all languages. You’ll find it at my site
Really useful, usually this words are blamed my visitors, Simply i removed now…
Thank you for this post. The website looks a lot cleaner without the comments text.
We’re using VectorLove and the .nocomments { display:none; } added to the style sheet worked for our site.
Thanks!
I’m sorry, but I’m an idiot. I’m using the Brunelleschi theme. I see the CSS box and I copied and pasted the CSS suggestion, but that didn’t work. What files are you referring to? I see no links to “singlepost.php” and/or “page.php” and/or “”singlepage.php” files on the dashboard. Where would I even go about looking for this code?
Hi sam – see the video I uploaded in the article. That might help.
Thank you so much for this post. I really appreciate the help I’ve found in the blogging community.
Thank you, very lovely to find this post. Very helpful!!
Thank you, Thank you, Thank you! I love you all. This worked and my comment/leave a reply box is gone.
Hi,
I am using 2011 theme, and I am not able to remove the leave a reply on all my pages. I got so frustrating trying to figure out how I could remove this and to no avail. Any pointers? I have tried to unchecked all the boxes on -setting -discussion- and it didnt worked!
Hope someone could help me out ..
Thanks
Nat
Hi, i had the comments option open ( and thy were widely used) and today all of a sudden i see ” comments are closed” under each option without changing anything!! Do you know how to turn them back on? All the options on ” settings” are on as they should be. Thanx!!
Sorry I need more information as I am not sure what you’re talking about.
Thanks!! Worked perfectly.
Thank you very much for this post, I was going crazy trying to remove this message. I could remove it through the CSS using the code:
.nocomments {
display: none;
}
and it’ worked great.
I had a similar issue, but discovered that I had entered arguments in
in functions.php causing comments to be closed.
The simplest and less intrusive solution has to be .nocomments { display:none; }
For those having issues, just go to
Appearance > Editor
look for the (style.css) generally at the bottom of the files list on the right.
scroll through the stylesheet until you see body { styles will be in here }
And paste .nocomments { display:none; } directly below.
Simples!
In the Atahualpa theme remove
in comments.php the entire line:
in comments-paged.php the sentence:
Comments are closed.
It worked for me
Can’t edit…
The line is ..
Please remove the dots and do the editing for me, thanks.
Darn!
It is the line with ['comments_are_closed_text'] inside!
Sorry to mess up your comments, please edit the first one.
LOL It’s ok. I don’t mind a bit of mess
Hia,
Great post -
Just wanted to add that there is an alternate option here that might be a little cleaner (for some) and wont disable comments entirely:
1. Customising the ‘Comments are closed’ text:
Your custom 'comments are closed' text.
2. Removing the ‘Comments are closed’ text altogether:
Hope this helps, cheers!
Seems like the
tag stripped the code!Here it is again:
- or -
Sorry, comments are closed.
Hmmm Still not showing up. Do you want to email it to me and I’ll include you and your suggestion in the original post if it’s good!
Hi! I am utterly lost. I don’t even know how to get to .php files. How do you do that?
Thanks,
Teri
Hi Teri
In your dashboard go to appearance section and then to “editor” you’ll see a drop down thingy to choose your theme to edit and under that a list of files for each theme.
Make sure you copy the file you’re going to alter in case you need to revert back to the original. Just open the file, copy what’s in it and paste to a notepad document. Then you can edit the original in the dashboard without worrying that you’ll completely wreck things.
Cheers
Thanks!! I don’t have the “editor” option…do I need to upgrade to wordpress.org?
Thanks!
Is your blog hosted with wordpress.com? I’ve only ever hosted my own wordpress sites so yes, I guess you’d have to do that to edit the themes if WP.com block access to editing. Sorry. Anyway – I’ve put up a video to cover your question coz there are probably others who don’t know how to do it either
Wow!!! Thank you so much. This is so helpful! I can’t wait to see the video.
thanks for the tips!A great share
This is helpful but not in my case. Because i want to show comments on some pages and on some i do not want to show any comments. have also followed your instructions to remove it from the comments.php file but still no luck i still see the message “comments closed” i have made a wide search on each of the page and i cannot find such text. I know php well but still no luck the theme i am using is “Red Classic”
Something more easy that all..
look for the name of the “class” that contains “comments” and put this
display: none;
And save, thats all!
Hi. I am just creating a website on WordPress and don’t want comments available. Your advice was really helpful and worked. The was actually in the comments.php on the template I am using and /* and */ didn’t work so I jus deleted the line. I would have not known to do this though without your article. Thank you.
Very helpful and well put together article.
I’d already solved this problem a while ago then promptly forgot how! The “css .no comments” is the way to go.
Thanks Web Sheila.
David.
Thanks. Its really helpful.
Thank you for this post… and all the comments. It looks like they have helped out a lot of people. My sister called me very late at night with this problem of hers. Unfortunately, none of these solutions worked. So I kept searching. She has a regular desktop computer… and interestingly, I discovered she has a different “right click” menu for the desktop than I’m accustomed to seeing. This was the fix that worked for her…
Hey! I could have sworn I’ve been to this site before but after browsing through some of the post I realized it’s new to me.
Anyways, I’m definitely glad I found it and I’ll be bookmarking and checking back
often!
Thanks a lot…when i search din WordPress.org they only says about discussion option setting but i guess that only helps in enabling or disabling for every post but now i got the right way to enabled the closed comment
again thanks a lot
Thank you. It worked. I added the facebook comments to the page and after turning off the normal comments the message came up. this fix worked great!
Thanks, worked like a charm for me!
There is a much easier solution. Find your custom CSS settings in wordpress and simply add:
.no-comments {
display:none!important;
}
Done.
Particular themes may use a different class name* This is easily reversible there’s no need to mess with site files.
In your case, use “no comments” as this is your specified class name:
.nocomments {
display:none!important;
}
Hello there! Quick question that’s completely off topic. Do you know how to make your site mobile friendly? My website looks weird when viewing from my iphone 4. I’m trying to find a
theme or plugin that might be able to fix this problem.
If you have any suggestions, please share. Thanks!
Very helpful, thank you!