How To: Remove ‘Comments Are Closed’ in Thesis

by Greg Rickaby on October 14, 2009

Ever wanted to remove the, “Comments on this entry are Closed” in Thesis?  Easy! Just copy the CSS code below and paste anywhere in custom.css:

.custom .comments_closed {text-indent: -9999px;}

OR:

.custom .comments_closed {display: none;}

Either way you’ll be “hiding” the text from human eyes.

comments-are-closed

Before

comments-are-closed-fixed

After

UPDATE 4.14.10

With the recent release of Thesis 1.7, there is an easier way (although the above method still works)

  1. WP Dashboard –> Thesis Site Options –> Display Options –> Comments
  2. Uncheck “If comments are closed, display a message”
  3. Big-Ass Save Button

thesis_17_remove_comment_text

Related posts:

  1. How To: Add/Remove Thesis Elements using custom_functions.php
  2. Thesis 1.8 Header Image
  3. 7 Hours In: Thesis 1.6b Review
  4. How To: Upgrade to Thesis 1.6 (in 15 minutes)
  5. How To: Create a Print Friendly Thesis Website

{ 14 comments… read them below or add one }

Jon August 6, 2010 at 12:53

FYI, the location of the comments settings has been moved since the 1.8 release. Instead of Site Options, it has been re-located to Design Options -> Display Settings -> Comments.

Reply

Greg Rickaby August 6, 2010 at 14:44

Yup, it’s still in beta…but good call.

Reply

Website design April 12, 2010 at 07:50

I haven’t used thesis theme but I have save this page for future reference. It is worthy to spend time reading this post.

Reply

Jordan March 6, 2010 at 18:29

Oops…

I left out the code I added to custom_function.php:

function remove_no_comments() {
if (!comments_open())
remove_action(‘thesis_hook_after_post’, ‘thesis_comments_link’);
else
add_action(‘thesis_hook_after_post’, ‘thesis_comments_link’);
}

add_action(‘thesis_hook_before_post’,'remove_no_comments’) ?>

AND, possibly worse… I now see that this is the wrong thread because the fix on this thread is css-based and not functions.php. The only question, does the code immediately above come from you, or did I confuse the source of the code as well. If so, my apologies!

Thanks again,
Jordan

Reply

Jordan March 6, 2010 at 18:09

Hey Greg –

Thanks again for all the terrific content!

I applied this fix and it works in my ‘sandbox site’ – it surely removes the “Comments are closed” comment. But there seems to be a problem related to introducing this code to the custom_functions.php file.

I’m using Mike Nichols’ fat-footer code which enables you to place widgets in the footer. It works fine. However, as soon as I introduce your code to remove the “Comments are Closed” comments (and they are successfully removed), and then click on the drop down Categories widget, it returns a WP error (code below). When your fix is removed from custom_functions.php, no such error happens.

Here’s the fix code I put in custom_functions.php:

Once the drop down Category widget is used, here’s the resulting error message:

Warning: Cannot modify header information – headers already sent by (output started at H:\WEB WORK\local_ioa\wp-content\themes\thesis_16\custom\custom_functions.php:40) in H:\WEB WORK\local_ioa\wp-includes\pluggable.php on line 868

Here are the relevant lines from pluggable.php:

function wp_redirect($location, $status = 302) {
global $is_IIS;

$location = apply_filters(‘wp_redirect’, $location, $status);
$status = apply_filters(‘wp_redirect_status’, $status, $location);

if ( !$location ) // allows the wp_redirect filter to cancel a redirect
return false;

$location = wp_sanitize_redirect($location);

if ( $is_IIS ) {
header(“Refresh: 0;url=$location”);
} else {
if ( php_sapi_name() != ‘cgi-fcgi’ )
[868] status_header($status); // This causes problems on IIS and some FastCGI setups
header(“Location: $location”, true, $status);
}

I inserted [868] to show the line of code referenced in the error message.

I’m running this on a localhost Xampp Apache server (on a PC), WP 2.9.2 and Thesis 1.6.

I know that the error results from using the fat-footer widget, but it only happens when the code is in the file. I didn’t want to burden you with more code… but will gladly send you the entire custom_functions.php, if you’d like to review.

Many Thanks!
Jordan

Reply

lif modelleri January 3, 2010 at 23:03

artik bende ne yazacagimi sasirdim?

Reply

Joseph December 30, 2009 at 23:41

Hi Greg,

Me again :) I've disabled Disqus and your css trick above is working which is cool.

You mentioned about the disqus hack you are using to remove their stuff on the pages and posts I want comments closed.

Can you share what that is? I've tried doing it myself by playing with the custom.css file but I ended up removing everything relating to disqus! Even on pages and posts I want comments on. :)

Cheers
Joseph

Reply

Jason @ forty2fifty.com December 30, 2009 at 16:24

Thanks… It worked perfectly

Reply

Joseph December 27, 2009 at 21:42

Hi Greg,

Here you go, http://twe.to/of7f

Thanks for that.

Joseph

Reply

gregrickaby December 27, 2009 at 20:25

Can I see a link to your site? I would be happy to take a look. I hacked Discus using CSS, that's it. “display: none” is very powerful ;)

Reply

Joseph December 27, 2009 at 15:42

Hi Greg,

Here you go, http://twe.to/of7f

Thanks for that.

Joseph

Reply

gregrickaby December 27, 2009 at 14:25

Can I see a link to your site? I would be happy to take a look. I hacked Discus using CSS, that's it. “display: none” is very powerful ;)

Reply

Joseph December 25, 2009 at 16:54

Hi Rick,

Is there any reason you can think of that would stop this tip from working? On my thesis site I've tried both options but it hasn't removed the text.

Also, I'm using Disqus on my site too. I would like to remove the Disqus comments stuff there also. This is the stuff that is visible on a post that I have disabled comments:

You are commenting as a Guest. Optional: Login below.

*

Comments for this page are closed.

Showing 0 comments
Sort by Subscribe by email Subscribe by RSS

Thanks.
Joseph

Reply

James Evesque February 11, 2010 at 19:05

use both:

I think the HTML framework you use may be the problem, so using both will make you covered. I have yet to have problems now, I have yet to find anything on this, besides the first code.

.custom .comments_closed {display: none;}
.custom .to_comments {display: none;}

Reply

Leave a Comment

Previous post:

Next post: