ThemeShaper Forums » Thematic

[closed]

Completely getting rid of comments?

(6 posts)
  • Started 4 years ago by goblinmason
  • Latest reply from shekwan
  • This topic is resolved
  1. goblinmason
    Member

    Hi all! First off, great job on this theme - I'm really learning a lot using it. I've always just used out of the box themes before and it's fun to edit your own when you've got such a good starting point.

    OK - Onto my question. I searched for this but all I could find was how to disable comments. I want to get rid of any trace that comments exist! For instance, I don't want to see "comments closed" or anything of that nature.

    Sorry if this is a total noob question, but I'm almost a total noob!

    Thanks!

    -Craig

    Posted 4 years ago #
  2. tolmarc
    Member

    you should remove the mark from "Allow people to post comments on new articles " on the discussion settings in wordpress.

    after that you may filter the content section in order to erase the "Comments are closed" notice.

    Posted 4 years ago #
  3. redhatgal
    Member

    Hello, I am in the same situation, but am unable to find the "Comments are closed" part to comment it out. Which .php file is it in?

    I understand that I should not edit anything that is outside my theme folder, but so far, I'm not having any luck locating the entry meta tag that appears under each post.

    Is there an application, like Web Developer Tools, that will tell you the .php's file name where I can locate exactly the "Comments are closed" is located?

    Just to clarify, I want to remove the reference "Comments are closed" in the post-meta area, but leave in place the Tags and Category information.

    Amy

    Posted 4 years ago #
  4. shekwan
    Member

    It's in wp-content/themes/thematic/library/extensions/

    The file is called content-extensions.php

    One section starts on line 658 -- the section is called -- "// Create comments link and edit link" -- the comments closed starts on line 673 (the last line of that section) -

    $postcomments = ' <span class="comments-link comments-closed-link">' . __('Comments closed', 'thematic') .'</span>';

    Change the 'Comments closed' to a space and that text is gone.

    The other section starts on line 683 -- that section is called -- // Create permalink, comments link, and RSS on single posts

    edit the appropriate output to have it be what you want - this is for the post page itself.

    Posted 3 years ago #
  5. Caramboo
    Member

    That's not the way because you're editing the thematic files directly. They'll get overwritten on future updates.

    I just cobbled this together from other people's posts on here. Place it in your functions.php and it should work. I put it on pastebin for formatting purposes:

    http://caramboo.pastebin.ca/1903649

    Posted 3 years ago #
  6. shekwan
    Member

    Yeah, that didn't work at all. I understand the pragmatics, though -- not to edit the files directly. In one sense, though, comments are such an integral part of WP that you are sort of in a sense, at least, modifying a core thing.

    It goes against the pragmatics, but so long as you can find the text, it's an easy fix. I used "more" and "grep" to do it, but I'm sure there's more sophisticated ways to do it, using "find" or perhaps "xargs" or something like that.

    It's pretty straightforward -- whether you have trackbacks on or off, etc... just modify that particular text. Not perfect, and not pragmatic, but it does work.

    But I understand the pragmatics -- and thanks for the tip -- don't modify the thematic files directly.

    Posted 3 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.