• I’m using this code in my functions.php which automatically puts an excerpt of the comment being replied to at the top of the reply (see bottom of page).

    I’ve tried everything I can think of. Any ideas?

    function reply_woohoo($comment) {
    $comment_handle = get_comment(get_comment_id());
    if ($comment_handle->comment_parent) {
    $parent = get_comment($comment_handle->comment_parent );
    $parent_author = get_comment_author($parent);
    $parent_comment = get_comment_excerpt($parent);
    $comment = '<div class="commentreplywoohoo">This is a reply to '.$parent_author.'\'s comment: '.$parent_comment.'</div>' . $comment;
    }
    return $comment;
    }
    add_filter('get_comment_text', 'reply_woohoo');
Viewing 1 replies (of 1 total)
  • Thread Starter Horace

    (@ediebaloo)

    Okay, I just realized that it only adds <p> tags if there are line breaks in the original comment?

Viewing 1 replies (of 1 total)
  • The topic ‘Remove P Tags From Comment Excerpt’ is closed to new replies.