WordPress.org

Ready to get started?Download WordPress

Forums

How to hide 'Comments Closed' in 3.1 update (29 posts)

  1. imdjluis
    Member
    Posted 3 years ago #

    In versions of WordPress, you could go into the editor and in comments.php, you could erase the words 'Comments are closed.' so that when you disable comments for a specific page or post, nothing would be there to make it appear that you have closed the comments for the post. With the new 3.1 update, there is a new message that says Comments Closed in a bigger font size. If I go under comments.php, I still see that where I removed 'Comments are closed.' is still gone, but I cannot find anywhere in the Editor where Comments Closed is at. Can anyone help me remove this? The reason I do this is because I made this site look more like a real website, as opposed to a blog, so this is very important to me. The site I'm referring to is at http://www.chalieboy.net/ which uses WordPress. Go to the Bio, Discography or Links page and you can see what I'm talking about.

  2. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    Add this line to your theme's style.css:

    p.nocomments, #respond h3 { display: none; }

  3. imdjluis
    Member
    Posted 3 years ago #

    Where exactly do I put it in style.css?

  4. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    Put it at the very end and you may precede it with a comment:

    /* My changes */
    p.nocomments, #respond h3 { display: none; }
  5. imdjluis
    Member
    Posted 3 years ago #

    I added what you posted at the very end but it's still there.

  6. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    Could you send me the core .php file you've hacked? What theme do you use? Did you modify it too? Send me the info and files through my website's contact form.

  7. truefunnystories
    Member
    Posted 3 years ago #

    Hi, in general, I use zend(what is your IDE?) search something like "Comments Closed" in all of files, you will find the function and then you can search the do_action in this function and remove it. It will works,

  8. truefunnystories
    Member
    Posted 3 years ago #

    Sorry, I reply again is just for subscribe this post.

  9. imdjluis
    Member
    Posted 3 years ago #

    Well I didn't hack the .php file. I'm using a theme I created with Artisteer 2 and I didn't make any edits to any of the files, except for comments.php where I erased the text 'Comments are closed.'

  10. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    Could you send me the original comments.php (before your modification)? If I have it I should be able to help.

  11. imdjluis
    Member
    Posted 3 years ago #

    Ok just sent it.

  12. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    Ok. Copy original comments.php back to the theme. Leave css change in style.css. First part of css line (before comma) will take care of the part you've modified. Let me know when you are done with it and then I'll connect to your website and have a look at page source.

  13. imdjluis
    Member
    Posted 3 years ago #

    Ok I've done that. But now, I can't get 'Comments are closed.' back, but I wrote it back in where it was, and I added the text you said above at the very end of style.css

  14. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    Good. That means, the first part of css addition ( before comma ) works. The second Comments Closed, the big one is also created by theme, but it is not in comments.php. I know for a fact that core does not create this message directly. Do you have any editor that you can search for this phrase in all theme files? I can do it with PSPad Editor. If you don't, you can send me a complete theme folder (zipped) and I'll find it. Of course if you trust me that I won't use your theme for anything else.

  15. imdjluis
    Member
    Posted 3 years ago #

    Well I went through every file of the theme and Comments Closed was no where to be found. How is it that the theme editor I have could have created this?

  16. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    All my themes ( I use 8 different themes ) generate both messages, but they have proper classes and ids and it is easy to disable them with css only. Which version of Artisteer you have? Mine is 2.5.0.31067 and I just created a new theme and both messages are there. One is in comments.php and second in legacy-comments.php.

  17. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    One explanation. All of my production themes are not made with Artisteer. I've used this program to create a theme and only check if all is in right places.

  18. imdjluis
    Member
    Posted 3 years ago #

    I'm using 2.3.0.21098 Home and Academic Edition. I upgraded but I didn't like it, so I went back to this version. I looked under Legacy Comments and it's not there, either.

  19. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    I think your version could be a bit old for WP 3.0+. The most recent version is 2.6. But it seems to be working. And your problem so far is more of a cosmetics nature.

  20. imdjluis
    Member
    Posted 3 years ago #

    I figured it out! Go to the Page Template (page.php) and remove the following line:

    <?php comments_template(); ?>

  21. imdjluis
    Member
    Posted 3 years ago #

    Apparently this is a problem people were having using the Artisteer to create their theme. It also removes the box that the Comments area would have been surrounded by.

  22. Frank P. Walentynowicz
    Member
    Posted 3 years ago #

    I would be carefull with this solution. If you use comments somewhere within your site it might produce undesirable results. Test it and it may be right solution after all.

  23. imdjluis
    Member
    Posted 3 years ago #

    I'm using the Facebook Comments on WordPress plugin, so I have no problem with that.

  24. nivat1
    Member
    Posted 3 years ago #

    If you install " facebook-comments-for-wordpress" plugin you have to look "facebook-comments-display.php" remove text "Comments Closed"

  25. lan_dawei
    Member
    Posted 3 years ago #

    Will the solution for placing

    p.nocomments, #respond h3 { display: none; }

    in the style.css also work in the custom.css file?

    thx

  26. imdjluis
    Member
    Posted 3 years ago #

    nivat1 is right. You have to go into FTP and find the facebook-comments-display.php file inside the Facebook Comments for WordPress plug-in folder, and remove the line Comments Closed. That is THE ONLY WAY to remove the bigger "Comments Closed" text that the plug-in shows. DO NOT USE MY EARLIER METHOD, I just discovered that it removes the commenter all together from a page. To remove the smaller "Comments are Closed." text, under Editor, go to Comments (comments.php) and remove the words Comments are Closed. which are inside 2 's, but leave those there.

  27. camoreno
    Member
    Posted 2 years ago #

    I am also using the Artisteer theme and would like to turn the availability of comments completely off.

    Can anyone help me with that?
    Thank you,
    camoreno

  28. dave_landis
    Member
    Posted 2 years ago #

    You can do this completely in WordPress.
    I have answered this questions at i-wanna-start-a-blog.com

    http://i-wanna-start-a-blog.com/blogging/how-to-disable-comments-on-selected-wordpress-pages/

    You can go through your pages one by one and turn off comments using Quick Edit.

  29. geraldinebcl
    Member
    Posted 2 years ago #

    Thank you so much! All the answers I had found were in php, and this was just what did it, in under 10 seconds! Thank you, thank you, thank you!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.