Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I like to have a clean blog, and I also like that comments that are replies to other comments actually are replies to other comments. Some people don't mind that difference too much and just leave another comment instead of a reply. That's alright, but I'd like to fix it so that my blog stays clean and so that things are clearer to myself.

Is there a way that I can "move" a regular comment so that it becomes a reply to a certain comment instead?

share|improve this question
    
By clean blog you mean organized blog... How about replies to a comment being shown beneath it.. inside a box or something..somewhat indented... and the comments all in the same line..one below each other –  user6926 Jul 11 '11 at 8:27

3 Answers 3

up vote 0 down vote accepted

first, if you're not already using it, you need wordpress threaded comment. you can stylize it with css of course.

after that, if someone comments the post, and you think it was supposed to be a reply to some other comment, you can do it with move wordpress comments or just do it manualy...

share|improve this answer
    
Cool. Threaded comments are already on. At least they look threaded when I reply to others comments. Will check out that plugin :) –  Svish Dec 12 '10 at 12:48
    
Simple plugin that worked nicely. Thanks! –  Svish Dec 12 '10 at 14:26
    
you're welcome =) –  pootzko Dec 12 '10 at 14:31

I use two plugins for moving comments, have used them on a site for moving over 1,000 comments to various posts (most of my commenter's posted 90%+ comments on one popular post no matter what the comment was about!).

http://www.dountsis.com/projects/move-comments/ : this allows you to move multiple comments in one go. This one is useful for moving entire threads from one post to another.

The plugin recommended by pootzko : move one comment at a time including changing threading.

Note: if you move a threaded comment with replies to another post and don't move the replies as well it "breaks" the threading, you'll find the child comments aren't threaded correctly. So you have to move them all in a thread (or remove the threading on the child comments).

David

share|improve this answer

A alternative for custom source. I had read this answers, but the plugins are old or with to much options and I will leave my small solution.

I never knew it’s that simple to copy all comments from one WordPress post to another. The following snippet copies all posts from $post_id to $new_post_id.

<?php
// copy all comments from post $post_id to post $new_post_id
foreach ( get_comments( array( 'post_id' => $post_id ) ) as $comment ) {
    $comment->comment_post_ID = $new_post_id;
    wp_insert_comment( (array) $comment );
}

get_comments() is a convenience function around WP_Comment_Query, so if you put this snippet inside a loop you can omit the ‘post_id’ parameter.

Oh, and if you don’t need to copy but to move the comments, you may be better off by just firing some good old SQL against your database:

<?php
function move_comments( $from_post_id, $to_post_id ) {
  global $wpdb;

  $sql = sprintf(
    'UPDATE %s SET comment_post_id=%s WHERE comment_post_id=%s;',
    $wpdb->comments,
    (int) $to_post_id,
    (int) $from_post_id
  );

  $wpdb->query( $sql );
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.