Hide Comment Box on Static Home Page

  • Author
  • #490583


    I have set up a static homepage for my blog. I have also turned comments off on the options, but a box with the text ‘comments are closed’ is still there. Is there anyway I can hide the comment box only on this page? Thanks.

    The blog I need help with is thewindbeat.wordpress.com.


    Open the post for edit, and in the “discussion” module below the text area, deselect “allow comments” and then click the “update” button.


    @tsp: They’ve done that; their problem is the “Comments are closed” message.

    @windbeat: You’ll have to switch to a theme in which static pages display no message when commenting is disabled – see here:




    It will depend on the theme you’ve used. Right now I’m looking at your blog and going through its CSS coding. When it shows the “Comments are closed”, it uses the following CSS:

    <div id="comments">

    <p class="nocomments">Comments are closed.</p>


    Based on this, you might be able to hide it from showing up on your blog posts/pages by going to the admin side and clicking on “Appearance > Edit CSS.” And in the stylesheet editor, add the following CSS:

    p.nocomments {display: none;}

    Save it, and see if this hides the no comments statement on your pages. The only problem with this is that if you change to a different theme later on, you might have to change this to match the CSS used on the new theme.

    Let me know if it works for you! Good luck! :-)


    That’s what I get for not reading close enough.

    {Goes to hide under rock}



    @windbeat – Not sure if wordpress will let you save that CSS I mentioned unless you have the CSS upgrade kit. If it only lets you preview but not save the stylesheet, then your only other option is to use another theme as @panaghiotisadam has mentioned unless you choose the upgrade of course.


    @tsp: No that’s what I thought too when I read the OP (because it says “a box with the text” etc.). It’s visiting the blog that made me realize what they mean.


    @crypticasian: No you cannot save CSS changes without the paid CSS upgrade.


    It would be nice if like on a static front page, the comments link could be hidden for less than the cost of a $15 CSS upgrade (not possible on all themes of course).



    @crypticasian: I have the CSS update and your line got rid of the text. The box where the text was is still there, however. Anything that will take it out as well? Sorry…kind of new to CSS.


    It appears as if all comments use that box which is defined under the #comments selector. I can’t see anyway to get rid of it on that page without getting rid of it on all of them.

    I remember devblog getting rid of something similar once I though by somehow using either the post or page ID# but it has been so long ago.

    Perhaps he will see this thread and tell you if it is possible.



    @thesacredpath: Yeah, I was able to turn it off, but only on all the pages… I hope devblog does see it! It is a frustrating little detail. Thanks anyway.


    You know, the other thing you might do is to talk with staff about it directly. That box really should not appear when you have comments turned off on a page in my opinion.




    To remove it from just your home and about pages try adding this code to your existing CSS:

    body.page #comments {display:none;}




    @hallluke: Brilliant! That did the trick. Thank you and everyone else for your help.

The topic ‘Hide Comment Box on Static Home Page’ is closed to new replies.