Support » How-To and Troubleshooting » HTML linebreaks (<BR> tags) in author/user bio section not working

HTML linebreaks (<BR> tags) in author/user bio section not working

  • Hello I have author pages showing on my blog that shows posts by that author, their name, their link, and bio.

    The bio is very long and I would like to manually insert line breaks within the bio using
    tags. However when I save it and view the page there is no line break the only way i managed to make it have a line space is by entering many   but it is not too effective.

    is there any solution for this?

    also is there a way to edit the fields when creating a user to have location, and city instead of aim, yahoo and jabber?

    thank you in advance!

Viewing 15 replies - 1 through 15 (of 19 total)
  • anyone anyone?

    I can’t get paragraphs or breaks to work on one of my pages also. It keeps putting the next line right next to the previous one. What’s up with that?

    i dunno =( it does the same thing for me…. i just put a bunch of spaces using   but it shows up different on every computer depending on their resolution so that solution does not really work….

    does someone happen to have a fix for this

    exdesign did you ever find out?

    Moderator kmessinger


    Forum Moderator

    How about a link?
    Are you using <br />?

    yes ive tried <BR /> <BR /> <BR /> and <p></p> and nothing works =(

    here is a link http://ampersandbox.net/?author=2
    notice under the author name theres a sentence or two. thats from the bio section when editing a user, i want to put line break within that section…but it wont work.

    ive tried hr tags as well still nothing…

    still cant figure this out.

    To display the bio with format you have to process the contents of it first.

    Assuming you got the user data by using:

    $userdata = get_userdata(intval($author));

    The biographical info is in: $userdata->user_description, and to display it the way you want, apply the filter ‘the_content’ to it

    $user_description = apply_filters("the_content",$userdata->user_description);
    echo $user_description;

    This should display the bio with line breaks or the format you entered.

    Carlos! god bless you for replying =D

    this is how I called the user data

    <?php the_author_posts_link(); ?>
    <?php the_author_description(); ?>
    <a href="<?php the_author_url(); ?>" target="_blank"><?php the_author_url(); ?></a>

    unsure how to apply your fix =(

    ok i adjusted my code to fuse with yours

    $the_author_description = apply_filters("the_content",$authordata->user_description);
    echo $the_author_description;?>

    it displays like before but now using your code, but line breaks still do not occur =(

    actually it does format, but only one line break, if i put two it will still only do one.

    ok, give this a try:

    $the_author_description = apply_filters("the_content",get_the_author_meta('description');
    echo $the_author_description;?>

    and for the line breaks, it’s odd because in my test it works just like the main editor. Try adding a couple of


    forgot to add the backticks

    … Try adding a couple of <br />

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘HTML linebreaks (<BR> tags) in author/user bio section not working’ is closed to new replies.