Title: comment_author()  line break?
Last modified: August 18, 2016

---

# comment_author() line break?

 *  [Lucid](https://wordpress.org/support/users/lucid/)
 * (@lucid)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/comment_author-line-break/)
 * I am cleaning up my comments page and want to display comments as follows:
    author:
   comment text…. I am using this: <?php comment_author() ?>: <?php comment_text()?
   > but it puts a line break in between the author and the text, is there a workaround,
   or am I doing something wrong? New to WP, already an addict. Thanks to all the
   devs who worked so hard to make such a great product. Great community here, glad
   to be a part of it. -Lucid

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Lucid](https://wordpress.org/support/users/lucid/)
 * (@lucid)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/comment_author-line-break/#post-118462)
 * Makes sense, gonna try and implement this change tonight.
    Many thanks…I have
   learned so much on these forums, hope I can help those is need learn as much 
   as I have been. -Lucid
 *  [helloalice](https://wordpress.org/support/users/helloalice/)
 * (@helloalice)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/comment_author-line-break/#post-118910)
 * This is exactly the problem I have but all I can see are Lucid’s two posts and
   not the response to the problem. Can anyone post the solution again please?
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 7 months ago](https://wordpress.org/support/topic/comment_author-line-break/#post-118911)
 * The “line break” is due to the comment text being put into paragraph tags. They
   are added by the default WordPress filters. When this is entered by the commenter:
 * `Hello, this is a comment.`
 * `Cool site!`
 * This is what’s outputted:
 * `Hello, this is a comment.
 * `Cool site!
 * This is so that two `<br />`‘s aren’t used and so that one can control the spacing
   between paragraphs.
 * Probably the easiest way to get around it would be to directly use the data from
   the database:
 * `<?php echo $comment->comment_content; ?>`
 * However, you’d need to sanatize the data and such for output (replace certain
   characters with HTML entities, replace line breaks with `<br />`‘s, etc.)

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘comment_author() line break?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * Last activity: [20 years, 7 months ago](https://wordpress.org/support/topic/comment_author-line-break/#post-118911)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
