• Resolved jakeisonline

    (@jakeisonline)


    Currently I don’t seem to be able to add linebreaks into the “About Yourself” (Description) for author profiles. As a result, when an author has a Bio which is several paragraphs, the linebreaks are not recognised when being rendered when called in to be display on the page (via $curauth->description;)

    Anyone have a solution?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jakeisonline

    (@jakeisonline)

    Fail, just answered my own post 😛

    This can be resolved by using a simple PHP function called “nl2br” which basically means it will convert carriage returns (that means a text line break) into the correct HTML linebreak format, br.

    To do it, you can simply use echo nl2br($curauth->description); in order to display an Author Bio complete with HTML Linebreaks.

    jakeisonline, you saved me other some hours of life!

    BTW, it’s some kind of bug. I have 1 blog with this problem and another without this problem. Both are 2.7.1 and on the windows hosting. Strange…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Line Breaks and About Yourself’ is closed to new replies.