removing comments in wordpress

7 replies
  • WEB DESIGN
  • |
i have turned of commenting , but how do i remove where it says comments are closed on my wordpress theme? which set of code do i remove from which file?
#comments #removing #wordpress
  • Profile picture of the author adanarchila
    You have to search for that tag on the comments.php file, or you can disable the comments from the single.php just look for the code comments_template() and replace that line with //comments_template()

    That will deactivate comments function, if you want it back just remove the 2 slashes.
    {{ DiscussionBoard.errors[4678652].message }}
  • Profile picture of the author jefftardif
    Or just open the database my PHPMyAdmin and delete comments from the WP_Comments table.
    {{ DiscussionBoard.errors[4685652].message }}
    • Profile picture of the author Istvan Horvath
      Originally Posted by jefftardif View Post

      Or just open the database my PHPMyAdmin and delete comments from the WP_Comments table.
      Wrong advice... don't listen to it.
      Signature

      {{ DiscussionBoard.errors[4685807].message }}
      • Profile picture of the author Joe Mobley
        You can turn off display of comments in you your user.css file.

        I avoid changing Wordpress or theme code as the changes will be wiped out with any updates to WP or your theme.

        In addition, screw up your php code and your life may be very interesting very quickly.


        Joe Mobley
        Signature

        .

        Follow Me on Twitter: @daVinciJoe
        {{ DiscussionBoard.errors[4686319].message }}
  • Profile picture of the author Istvan Horvath
    I still think the comment out "//" solution is the simplest... see reply #2.
    Signature

    {{ DiscussionBoard.errors[4686530].message }}
  • Profile picture of the author coolspot2
    thanks guys.

    i removed the following code from comments.php and it worked:

    <?php else : // this is displayed if there are no comments so far ?>

    <?php if ('open' == $post->comment_status) : ?>
    <!-- If comments are open, but there are no comments. -->

    <?php else : // comments are closed ?>
    <!-- If comments are closed. -->
    <p class="nocomments"><?php _e('Comments are closed', 'default'); ?>.</p>

    <?php endif; ?>
    {{ DiscussionBoard.errors[4696034].message }}
  • Profile picture of the author sadiecopywriter
    There's a plug in called "no comments on pages". That gets rid of every comment on every page.
    Signature

    Mercedes
    Need Free & Legal images for your books & blogs?
    Check out the FREE Little Black Book of Royalty Free Images.

    {{ DiscussionBoard.errors[4704318].message }}

Trending Topics