WordPress.org

Ready to get started?Download WordPress

Forums

Delete Comment from Comments.php (4 posts)

  1. courtneyelizabeth
    Member
    Posted 8 years ago #

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

  2. courtneyelizabeth
    Member
    Posted 8 years ago #

    awwwwww...it's GOTTA be possible...:(

  3. tomhanna
    Member
    Posted 8 years ago #

    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.

  4. courtneyelizabeth
    Member
    Posted 8 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.