Ready to get started?Download WordPress


How do I get subhead to break into two lines? (9 posts)

  1. empressoftheuniverse
    Posted 8 years ago #

    I finally got WordPress installed on my site and running OK (though there are still occasional difficulties with uploading images), but there's one thing I can't get it to do.

    Under "Options," in the descriptor line beneath the page title, I want a two-line entry. I've used the <br> code and several variants of that with a /, since WP seems to insert its own slashes into code. No go. The closest I've come is inserting a bunch of non-breaking spaces, but those don't work well at all. What do I need to do to make this work?

    Page is at http://www.paperpenalia.com/wordpress

    Any help is appreciated!

  2. Marc
    Posted 8 years ago #

    That question should be firected to the WP.org <Forum.

    This forum is for blogs hosted by WP only.

    EDIT Cute... you did, 3 minutes before asking the same question here.

    It didn't work did it?

  3. vkaryl
    Posted 8 years ago #

    These solutions were offered in a thread I can't find right now, I had copied them to file. Only problem is I'm no longer sure what the numbers in them refer to! I *think* Kafkaesquí was the one who provided the original info, maybe if he drops by he can shed some further light....

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

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

    The top one pertains to the blog name, the bottom one to the descripton (AKA "tagline" sometimes....)

  4. Kafkaesqui

    Posted 8 years ago #

    "I *think* Kafkaesquí was the one who provided the original info"


    I don't think that one got indexed by Google.

    (Another mark in the "let's fix search" column.)

  5. vkaryl
    Posted 8 years ago #

    Yup, that would be the critter. I bookmarked it this time.

    To the OP, please follow Kafkaesquí's link above, for the original post, and what it is about the numbers!

  6. empressoftheuniverse
    Posted 8 years ago #

    Kafkaesqui and vkaryl, thank you for that code... unfortunately, I'm pretty much a rank beginner and have no idea where to put it. I do understand about changing the numbers to the number of characters after which you want the <br> to occur, though. Do you have to edit the stylesheet and put it somewhere?

    Marc, you give me too much credit. I thought I'd only posted it once; no clue how I managed to do it twice. :)

  7. vkaryl
    Posted 8 years ago #

    Goes in your header.php, should see some similar lines in there calling the blog name and blog description.

  8. Kafkaesqui

    Posted 8 years ago #

    empress (never thought I'd refer to someone that way), you'd replace anything of this sort:

    <?php bloginfo('name'); ?>

    <?php bloginfo('description'); ?>

    with the code vkaryl points out. Unless the theme is doing something unusual to display blog title/description.

  9. 8wheels
    Posted 8 years ago #

    Thank you, Kafkaesqui & vkaryl. You rock!
    Scary thing is, I even have a glimmer of understanding the solution.

    Now the question is, is it a hack, or is it elegant?

    Only the hairdresser knows...

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.