1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can I completely delete the comments function in Wordpress?

Discussion in 'WordPress' started by fireworks-styles, Aug 18, 2006.

  1. #1
    Hiyya!

    Well..uhm..as the title says..

    Can i completely disable and delete the comments function in Wordpress. I have downloaded the latest version and I'm making a non-blog site but using Wordpress (if that makes sense). :)

    I figured out how to disable comments in the CP, but I dont want that, just a total deletion of this function on my site so there is absolutlely no trace of comments.

    Thanks for any help!

    Regards, Debra. :)
     
    fireworks-styles, Aug 18, 2006 IP
  2. Gordaen

    Gordaen Peon

    Messages:
    277
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The easiest way is to close them through the control panel, then find your theme's comments.php file, search for "Comments are closed" and replace it (remove that line if you want or just change the text to a space if it affects your layout).
     
    Gordaen, Aug 18, 2006 IP
  3. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #3
    Actually, the easiest way (and what Debra's looking for) is to find this command in the template file:

    comments_template();

    and remove it along with whatever HTML surrounds it (like DIV or P tags, etc.). Then it doesn't matter if commenting is on or off because the function will never be called.
     
    sketch, Aug 18, 2006 IP
    fireworks-styles likes this.
  4. fireworks-styles

    fireworks-styles Well-Known Member

    Messages:
    234
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    158
    #4
    Hi guys,

    Thanks for the advice :) I'm grateful.

    Regards, Debra. :)
     
    fireworks-styles, Aug 18, 2006 IP
  5. weppos

    weppos Well-Known Member

    Messages:
    99
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    125
    #5
    I think in this way you can however post a comment sending a proper HTTP post request.

    @fireworks-styles
    Have a look here http://ckunte.com/archives/2006/06/06/closing-all-comments-in-wordpress
     
    weppos, Aug 19, 2006 IP
  6. sketch

    sketch Well-Known Member

    Messages:
    898
    Likes Received:
    26
    Best Answers:
    0
    Trophy Points:
    148
    #6
    I assumed WP would have some kind of code to check who the referrer was to prevent direct requests, but skimming thru the comments functions I didn't see any, so you may be right.

    Still, I believe my suggestion is the easiest to remove the comments from the templates, then I'd turn off commenting for good measure.
     
    sketch, Aug 19, 2006 IP