Leun Kim's BlogWindy Odaiba

Others / Blog Tips

WordPress Plugin to Let Visitors Edit and Delete Their Own Comments (Editable Comments)

Blog TipsOthers3 comments

Translated from the Korean original. Read the original →

Out of the box, WordPress doesn't let visitors edit or delete their own comments.
So you either have to tweak the source yourself or use a plugin...
I'm not good enough to code it myself, so I did some googling and found a really lightweight, handy plugin!
It's called "Editable Comments."
First, download and install the plugin...
To be honest, I'd downloaded it ages ago but kept putting it off, because hunting for the right place to put the code was a pain. I figured I'd have to do it sooner or later, though... (Ctrl+F really comes in handy for this).
Once it's installed, you need to drop the following PHP code into the right spot:

<?php if ( class_exists( 'WPEditableComments' ) ) { WPEditableComments::edit('Edit'); } ?>
<?php if ( class_exists( 'WPEditableComments' ) ) { WPEditableComments::delete('Delete'); } ?>

 
I use a plugin called "Commentator," so I dropped it into this part of commentator.php and gave it a bit of styling:
<span>
   <a href="#" class="commentator-reply">
      <i class="<?php echo get_option('commentator_icon-comment-reply', 'commentator-icon-reply'); ?>"></i>
      <span><?php _e( 'Reply', 'commentator' ); ?></span>
      <span>
         <div style="color: #1982d1; float:right;">
            <?php if ( class_exists( 'WPEditableComments' ) ) { WPEditableComments::edit('Modify '); } ?>
            <?php if ( class_exists( 'WPEditableComments' ) ) { WPEditableComments::delete('Delete'); } ?>
         </div>
      </span>
   </a>
</span>

Well, as far as I can tell, it works just fine.
It looks like you can edit or delete a comment as long as you visit from the same IP you posted it from. If you want to see for yourself, go ahead and leave a comment.
 

Exception: the almighty blog owner

#Plugin#Wordpress#comment#commentator#delete#edit#comments#replies#deleting#editing

More in Blog Tips

See all

Comments 3

  1. kipid

    테스트?
    https://estima.wordpress.com
    여기는 소셜 로그인 댓글로 달리던데... (그래서 수정/삭제가 가능)
    뭔가 다른듯 하군요?

    1. Leun Kim

      그렇군요. 아마 Disqus를 이용하지 않나 싶습니다 ㅎㅎ

  2. ㅇㄹㄴㅇㄹㄴㅇㄹ

    Leave a comment

    Your name and comment are shown on this page (private comments only to the blog owner). Your e-mail address is never shown.

    Back to top