WordPress.org

Support

Support » How-To and Troubleshooting » Delete Comment from Comments.php

Delete Comment from Comments.php

  • courtneyelizabeth
    Member

    @courtneyelizabeth

    Hey guys,

    here’s a question: Is there a way to add a delete comment link to the comments.php page…i know there’s an “EDIT” comment link that shows when admin is logged in, but i’d like admin to be able to delete sometimes without having to click EDIT and be taken to the edit page before they can click DELETE on the EDIT page….sounds kind confusing, but hopefully you can help…

    thanks for any info…

Viewing 3 replies - 1 through 3 (of 3 total)
  • courtneyelizabeth
    Member

    @courtneyelizabeth

    awwwwww…it’s GOTTA be possible…:(

    There is a template tag for editing comments. There is no such tag for deleting comments, as that is just a function in the edit comment page (which the edit_comment_link tag calls). You’d need to do two things to do what you want to do. First, write a function to verify that the user is authorized to delete the comment. Second, if the user is authorized, display a link to call the function that deletes it. With no template tags to do that for you automatically, you’re looking at finding someone who knows how to code it in PHP. When you bump the post, though, it shows as having been replied to, so you’re less likely to get a response from somebody who would know how to do that.

    courtneyelizabeth
    Member

    @courtneyelizabeth

    i can handle small things in PHP…so i’ll give it a try….thanks Tom

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Delete Comment from Comments.php’ is closed to new replies.