Support » Fixing WordPress » how to hide comment link

  • Resolved goldmember


    in my posts, I’m electing to disable “Allow comments on this post”. However when I uncheck that box, then update the post, then go to the actual post page, there’s still a link at the bottom of the post that says “Comments:none”.

    how do I get this link to go away? thanks!!!!!!!

Viewing 7 replies - 1 through 7 (of 7 total)
  • sorry, to be clear this is on the page with the summary of my most recent posts. but not when clicking on the specific posting.

    please advise. thanks!

    I am afraid that disabling comments in the back-end will not automatically remove the comment links from your site. You will have to change the code in the file index.php to remove the links (I am assuming you are speaking about the main page of your blog). In this file you will have to search for the following:

    <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?>

    To remove the link you will have to remove the entire code snippet.

    thanks Arnold. i looked in my index.php file and below is what i found. so I should remove the ENTIRE line that’s beginning with or just a part of it??? thanks!

    <p class="postinfo"><strong>Posted:</strong> <?php the_time('F jS, Y') ?> under <?php the_category(', ') ?>.<br />
    <?php the_tags('Tags: ', ', ', '<br />'); ?>
    <a href="<?php comments_link(); ?>"><strong>Comments:</strong> <?php comments_number('none','1','%'); ?></a>
    <?php edit_post_link('[e]',' | ',''); ?></p>


    the first line would get rid of the time and category
    the next is the tags
    the 3rd line is the comments stuff
    the fourth line would remove the Edit Post that shows up when you are logged in

    and I wouldn’t touch that last </div> unless you are removing whatever opened it

    Don’t delete that p class tag unless you are deleting all that stuff tho……

    thanks. i took out the 3rd line and it worked!

    Dumb question, WP 2.9.2, which index file, I’m trying to do the same thing and none of the index.php files have that string in it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘how to hide comment link’ is closed to new replies.