WordPress.org

Support

Support » How-To and Troubleshooting » how to disable comments

how to disable comments

  • hi everybody, i am using wordpress building a business website, and i do not need the comments appear my pages, even the words “Comments Off”.

    what should i do to disable comments? thanks

Viewing 13 replies - 1 through 13 (of 13 total)
  • Go into your admin dashboard then click on “Themes” then “Editor”.

    Click the “Page Template” from the right side and remove the following line:
    <?php comments_template(); ?>

    thanks man, but i did what you told me, but the “comments off” still there. what should i do?

    Hi lewistang,

    I’m no WordPress expert but here is how I fixed it:

    In Main Index Template section:

    <div class="postBottom">
    				<small>
    					<a href="<?php the_permalink() ?>" title="" class="comments" style="float: left;"><?php comments_number('', '1 Comment', '% Comments' );?></a>
    					<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="more" style="float: right;">Read More...</a>
    				</small>
    			</div>

    I removed:

    <a href="<?php the_permalink() ?>" title="" class="comments" style="float: left;"><?php comments_number('', '1 Comment', '% Comments' );?></a>

    This got rid of the “0 Comments”

    I did the same for a slideshow featured section – template “featured.php”

    thanks for your helps. i couldn’t find the codes from upstairs in index.php, but i did delete the codes below :

    “?php comments_popup_link(‘0 Comments’, ‘1 Comment’, ‘% Comments’); ?”

    and the “comment off” is gone in the index.php, still on other pages, how to get rid of it in all pages? by the way, my wordpress version is 2.9.2

    does anyone know?

    you remove the same code from page.php.

    You may need to do the same in multiple templates. Like single.php, possibly more, like archive.php, etc.

    thanks Rvoodoo, i’ve checked, the exact same codes
    <?php comments_popup_link(‘0 Comments’, ‘1 Comment’, ‘% Comments’); ?>
    only appears in index.php? what about other php files, how could i do it?

    something is calling comments…do you see anything comment related in those other templates?
    <?php comments_template(); ?>
    for instance?

    the exact same code appears in single.php, i’ve remove it as you told. what about others?

    Not sure I quite understand what you are asking?

    What about others? Other templates? Other code?

    the rest of php files in the same theme

    “comments off” still appears.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘how to disable comments’ is closed to new replies.
Skip to toolbar