Support » Themes and Templates » Can I hide “comments off” tag?

  • Aga1


    I have several pages on my site that don’t require comments: I’d like to hide the “Comments Off” tag at the bottom of the post. Is there a plug-in that does this, or can it be done some other way?

    Many thanks for any tips.

Viewing 15 replies - 1 through 15 (of 18 total)
  • rcktech


    Hi Aga1

    You just beat me by 17 minutes, I have the same questions posted, You must have posted the question while I am still typing mine. I’ll have to watch both our messages.



    I’m doing a charity website, and some pages don’t need comments at all, such as a “Thank you for your donation” page, for example. Having “Comments Off” at the bottom of the page just looks ugly, as well as being pointless, and I’d like to remove it. However, there are also some pages where comments are welcome.

    All of the advice I’ve seen so far seems to be how to remove these words on ALL pages, not on selected ones. Is it simply a case of ‘all on/all off’ or is there any way of being selective?



    I would like to know how to do this too. I tried editing out snippets of code and I still couldn’t get rid of it. My next step is to design a page template with no comment code at all and see if that works; but I would like to know if there is another answer before I go to the trouble.



    Ok, I found the answer. It’s here:
    . Also, I found this post helpful: I think that since I want comments on posts but not on pages I will just create a new page template with the referenced code removed.



    No, this is still not it. This removes the tag from ALL pages, not selected ones.
    Come on… SOMEONE must know how to do this?

    I can’t believe no-one here has the answer to this…. anyone? Please?

    All of the advice I’ve seen so far seems to be how to remove these words on ALL pages, not on selected ones. Is it simply a case of ‘all on/all off’ or is there any way of being selective?

    I keep askin’ but no-one’s answerin’…. does that mean that you ALL don’t know? I can’t believe it…. can I hide the “comments off” on those pages that don’t require comments, and leave comments running normally on others?

    I would like to be able to selectively turn off the comments and comment form for certain pages also. Does anyone know of a plugin that adds this capability page by page?

    Here’s what I did to accomplish this.

    In my comments.php file, I removed the line
    <p class="nocomments">Comments are closed.</p>.

    Then, in my index.php file, find this line
    comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)'))
    and change it to this

    if ( comments_open() ) {
        comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)'));
    } ?>

    Then on any page you turn off comments for, you won’t see “Comments are off” or “Comments are closed”.

    i dont have

    comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’))

    that line of code so i’m not sure where to put your replacement, jonrichards.

    i’ve gone as far as to use the plugin> “no comments on pages”. seems like it’d be insanely useful, but it didn’t work for me. try it out for yourself. i’m pretty sure it disables all comments ANd that annoying ‘no comment’ txt. for some reason, no matter what i do i sitll can’t get it gone.

    i DID manage to get rid of the comment txt thing though, in page.php, possibly a custom thing for the theme i’m in.

    There’s a bit of php code within a div on the main index template (in my theme anyway) that you should be ale to change.

    Swap this
    <div class=”commentlink”><?php comments_popup_link(some lovely php code); ?></div>

    for this
    <div class=”commentlink”><?php if ( comments_open() ) {
    comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’));
    } ?></div>

    However, do take a copy before you play with it in case it doesn’t work. It worked in my theme, it may not in yours.

    I have this problem online when I see my WP Page on the Internet, but on xampplite “Comments Off” is not present. (All things being apparently equal.)


    I figured out how to turn off the “comments off” on the home page and on the rest of the pages but how do i turn it off for all of my posts?

    I wanted comments removed from my pages, but not posts. My theme had the line in the Page template (page.php) which I hid like this:

    <!–<?php comments_template(); ?>–>

    I would not delete anything from any template but just use <!– –> to hide the code.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Can I hide “comments off” tag?’ is closed to new replies.