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'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);?>
share|improve this question

2 Answers 2

up vote 2 down vote accepted

applying the 'the_content' filter could work:

<?php echo apply_filters('the_content', $comment->comment_content); ?>
share|improve this answer
    
Working! Thanks Michael! –  Andycap May 10 '11 at 21:24
    
I wasn't looking for the_content in codex, I was looking into get_comments...thanks for the tip, I'm putting it in my deck! –  Andycap May 10 '11 at 21:27

Try $GLOBALS['comment'] = $comment above that function.

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.