Adding a "Delete comment" to comments section (2 posts)

  1. XeroCool
    Posted 11 years ago #

    When someone posts and I'm logged in admin and I view their comments, I want to add a delete comment option. Like this. Right now, Its:

    Comment by xxxxx � xxxxx @ xxx | Edit This

    Next to Edit This, I want a delete this or delete comment link. How would I do this? Thanks :)

  2. Kafkaesqui

    Posted 11 years ago #

    This should start you on your way to something usable:

    <?php get_currentuserinfo(); if ($user_level > 0) { ?>
    <a href="wp-admin/post.php?action=confirmdeletecomment&amp;noredir=false&amp;comment=<?php comment_ID(); ?>&amp;p=<?php the_ID(); ?>">Delete comment</a>
    <?php } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.