WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. editblog
    Member
    Posted 8 years ago #

    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!

  2. reb_76
    Member
    Posted 8 years ago #

    can you use a <br /> in there?

    I've no idea if that's valid code, but it's what I do. ;)

  3. Samuel B
    moderator
    Posted 8 years ago #

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

  4. editblog
    Member
    Posted 8 years ago #

    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.

  5. vkaryl
    Member
    Posted 8 years ago #

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

  6. vkaryl
    Member
    Posted 8 years ago #

    <?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.

  7. editblog
    Member
    Posted 8 years ago #

    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.

  8. vkaryl
    Member
    Posted 8 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic