WordPress.org

Support

Support » How-To and Troubleshooting » 2 lines (or a carriage return) in the description of my header

2 lines (or a carriage return) in the description of my header

  • This should be an easy one but I couldn’t find anything that answered specifically…

    I would like to add a second line or just a return in the description line below my blog title. Right there in the header. Right now I have a short one line description but when I make it longer it stretches into one long line and is not readable and goes off the header. If I could put a return in there I could easily fit it on 2 lines.

    Thanks for any wisdom!

Viewing 7 replies - 1 through 7 (of 7 total)
  • can you use a <br /> in there?

    I’ve no idea if that’s valid code, but it’s what I do. 😉

    <br /> won’t work and it won’t accept carriage returns. Messing with the code is the only way I know to do it.

    samboll….. can you point me where to find some info on manipulating that code? I can probably find the line in the css but what code could I use to make that happen?

    Thanks for the help.

    Give me a few; Kafkaesquí posted a workaround here a few months back, I think I have it saved to file.

    <?php
    echo substr_replace(get_bloginfo('name'), '<br />', 12, 0);
    ?>

    <?php
    echo substr_replace(get_bloginfo('description'), '<br />', 12, 0);
    ?>

    Those are for both title and description. You put them into the header where the call lines for them are, replacing the original.

    Thanks again vkarly. I’m going to mark this as answered and give it a try.

    One more ? … I see where the description goes, but if the line of text is still too long, will it wrap or exactly how do you make it return to a second line?

    Thanks again.

    I think you’d have to tweak where the <br /> went, though I’m not sure how to do that – I’m no programmer, that would be Kaf, who’s among the missing seems like. And it’s possible (I honestly don’t know, and haven’t had the need to find out) that it will auto-wrap.

    Believe me when I tell you that you can tweak all you like, when you get it right it will work, if it’s not right it won’t. I know that’s not very helpful, but it’s about all I can produce right now, sorry!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘2 lines (or a carriage return) in the description of my header’ is closed to new replies.
Skip to toolbar