I’m displaying a comment outside the comment template, getting it with get_comments() and echoing the comment_content. My problem is that the comment loses the formatting (paragraphs, line breaks, etc…). In my template I’m using TinyMCEComments (TinyMCE on comment form).

Someone pointed me to this solution, but is not working for me.

<?php echo wpautop($comment->comment_content);?>

2 Answers
2

applying the ‘the_content’ filter could work:

<?php echo apply_filters('the_content', $comment->comment_content); ?>

Leave a Reply

Your email address will not be published. Required fields are marked *