How do I get rid of the "Comment" icon in WP?

10 replies
  • WEB DESIGN
  • |
I have a WP site that I do not want comments on any pages. I have managed to not allow commenting but the small icon that shows the number of comments is still visible on every blog page. They all say "0" comments of course which looks bad. Is there an easy way to get rid of that icon for the whole site at one time?

Thanks-----
#comment #icon #rid
  • Profile picture of the author Quasha
    Find the following line from your theme's single.php file:
    <?php comments_template(); ?>

    and delete it. \Hope it'll work
    {{ DiscussionBoard.errors[3723021].message }}
    • Profile picture of the author dassad
      Originally Posted by Quasha View Post

      Find the following line from your theme's single.php file:
      <?php comments_template(); ?>

      and delete it. Hope it'll work
      This will not help, since this deletes only the include of the comment form. (if the comment count icon is not included in your comments.php file.)
      Please show me your Wordpress URL, and i tell you what you need to remove to get rid of it since depends on your used theme. You can send it in PM to.

      If you are talking about the site in your signature and you want to remove those orange bubbles that can be done easily.

      You have to edit 2 files since i see that the comments count is displayed in your CATEGORY VIEW to.

      First go to your Theme editor in you admin dashboard and open SINGLE.PHP.

      There must be a code that looks like this one:

      Code:
      <span class="comments">
      <a href="XXXXX" title="XXXXX">COMMENT COUNT PHP FUNCTION INCLUDE</a>
      <span class="bg"></span>
      </span>
      The XXXXX and the text is different but i don't know which functions are used by your theme.

      If you find it just comment it out
      this way:

      Code:
      <!--
      <span class="comments">
      <a href="XXXXX" title="XXXXX">COMMENT COUNT PHP FUNCTION INCLUDE</a>
      <span class="bg"></span>
      </span>
      -->
      and save it. Check your page and if it's OK than you can delete the whole code or you can leave it as is.

      When you are done, go to your ARCHIVE.PHP file and do the same thing to the same code.

      And voila
      Thank you!

      Regards,
      daSSad
      {{ DiscussionBoard.errors[3723306].message }}
      • Profile picture of the author Quasha
        Originally Posted by dassad View Post

        This will not help, since this deletes only the include of the comment form. (if the comment count icon is not included in your comments.php file.)
        Oh.....sorry....I am confused now....But thanks for the information and I am now little bit tensed about what I know.....:p
        {{ DiscussionBoard.errors[3733522].message }}
      • Profile picture of the author Istvan Horvath
        Originally Posted by dassad View Post


        There must be a code that looks like this one:

        Code:
        <span class="comments">
        <a href="XXXXX" title="XXXXX">COMMENT COUNT PHP FUNCTION INCLUDE</a>
        <span class="bg"></span>
        </span>
        There isn't.
        Function Reference/comments popup link « WordPress Codex
        Read about the tag you are looking for
        There is also the code to hide it if comments are not allowed.

        Reading the documentation always helps... just saying!
        Signature

        {{ DiscussionBoard.errors[3733587].message }}
        • Profile picture of the author dassad
          Originally Posted by Istvan Horvath View Post

          There isn't.
          Function Reference/comments popup link « WordPress Codex
          Read about the tag you are looking for
          There is also the code to hide it if comments are not allowed.

          Reading the documentation always helps... just saying!
          thats why i don't included full code only XXXXX and TEXT HERE OF... bla bla bla

          That code part can be easily identified by the SPAN ID COMMENTS code line, that's why i included it and not only the linking code with PLACEHOLDER text.

          If the theme is a free theme i can check what is defined where, but it's a payd The Station WOOTHemes theme so i couldn't check the exact code.

          If you need, send me via email or upload it in send in PM your themes SINGLE.PHP and ARCHIVE.PHP file and i remove that comment count bubble.


          Regards,
          daSSad
          {{ DiscussionBoard.errors[3736099].message }}
      • Profile picture of the author Janice Sperry
        Originally Posted by dassad View Post

        This will not help, since this deletes only the include of the comment form. (if the comment count icon is not included in your comments.php file.)
        Please show me your Wordpress URL, and i tell you what you need to remove to get rid of it since depends on your used theme. You can send it in PM to.

        If you are talking about the site in your signature and you want to remove those orange bubbles that can be done easily.

        You have to edit 2 files since i see that the comments count is displayed in your CATEGORY VIEW to.

        First go to your Theme editor in you admin dashboard and open SINGLE.PHP.

        There must be a code that looks like this one:

        Code:
        <span class="comments">
        <a href="XXXXX" title="XXXXX">COMMENT COUNT PHP FUNCTION INCLUDE</a>
        <span class="bg"></span>
        </span>
        The XXXXX and the text is different but i don't know which functions are used by your theme.

        If you find it just comment it out
        this way:

        Code:
        <!--
        <span class="comments">
        <a href="XXXXX" title="XXXXX">COMMENT COUNT PHP FUNCTION INCLUDE</a>
        <span class="bg"></span>
        </span>
        -->
        and save it. Check your page and if it's OK than you can delete the whole code or you can leave it as is.

        When you are done, go to your ARCHIVE.PHP file and do the same thing to the same code.

        And voila
        Thank you!

        Regards,
        daSSad

        Thanks so much! It worked just like the step-by-step you outlined!
        {{ DiscussionBoard.errors[3741890].message }}
        • Profile picture of the author dassad
          Originally Posted by Janice Sperry View Post

          Thanks so much! It worked just like the step-by-step you outlined!
          Great! Good job, looks good

          Hit me up if you have any more questions

          Regards,
          daSSad
          {{ DiscussionBoard.errors[3741934].message }}
          • Profile picture of the author Joe Mobley
            I try not to modify any of the .php files if possible. This allows for theme updates while keeping my changes in place. I do have to backup the user.css file.

            I have the following in the user.css file.

            Code:
            /* Remove comments */
            .posts-default .entry-comments { display: none; }
            .nocomments { display:none; }
            .posts-default .published { display: none;}
            So, in the code daSSad uses,

            Code:
            <span class="comments">
            <a href="XXXXX" title="XXXXX">COMMENT COUNT PHP FUNCTION INCLUDE</a>
            <span class="bg"></span>
            </span>
            in the user.css file this should work.

            Code:
            .comments { display:none; }
            Hope this helps.

            Joe Mobley
            Signature

            .

            Follow Me on Twitter: @daVinciJoe
            {{ DiscussionBoard.errors[3744547].message }}
  • Profile picture of the author dassad
    Joe this helps also but why to keep and run unwanted codes in your source if you don't need them. In your version the code is running only that the result isn't visible. So i always remove from the source code and don't hide it.

    Regards,
    daSSad
    {{ DiscussionBoard.errors[3746228].message }}
    • Profile picture of the author Joe Mobley
      daSSad,

      My reasoning, and it may not be the best reason, is 2-fold:

      1) I can keep all of my appearance changes in 1 place. Paragraph text formatting, header background color, nav bar boarder, widget stuff, posts tweaks, page formats, etc. You get the idea. 1 file, user.css to deal with. Not several .php files.

      2) If or when you upgrade the theme, changes to the respective .php file edits are gone. You get to hunt them, the changes, down and do it again.

      Using the user.css file, just back it up, upgrade the theme, copy-and-paste back in.

      Just my approach.


      Joe Mobley


      Originally Posted by dassad View Post

      Joe this helps also but why to keep and run unwanted codes in your source if you don't need them. In your version the code is running only that the result isn't visible. So i always remove from the source code and don't hide it.

      Regards,
      daSSad
      Signature

      .

      Follow Me on Twitter: @daVinciJoe
      {{ DiscussionBoard.errors[3748385].message }}

Trending Topics