Hide Comment Box on Static Home Page

  • Author
    Posts
  • #490583

    windbeat
    Member

    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.

    #490712

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

    #490720

    @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:

    http://wpbtips.wordpress.com/2010/05/06/comments-off-2/

    #490722

    crypticasian
    Member

    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>

    </div>

    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! :-)

    #490723

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

    {Goes to hide under rock}

    #490726

    crypticasian
    Member

    @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.

    #490727

    @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.

    #490728

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

    #490729

    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).

    #490760

    windbeat
    Member

    @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.

    #490762

    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.

    #490765

    windbeat
    Member

    @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.

    #490766

    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.

    http://en.support.wordpress.com.contact/

    #490772

    hallluke
    Member

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

    body.page #comments {display:none;}

    lh

    #490773

    windbeat
    Member

    @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.