Weird title word wrapping issue

  • Unknown's avatar

    I’m experiancing a weird issue with the way my titles for posts are showing up on my website (bitof.wordpress.com). Not sure if what’s causing it, but it seems to be a recent issue with titles being split into two lines ridiculasly early in the title:

    Example 1:

    Article title:
    Humor: “Meth and Cookies…” (Very Demotivational)

    Came out looking like:

    Humor: “Meth and
    Cookies…” (Very Demotivational)*

    *Note: I tried removing the “…” and changing the spacing on the words, but the titles wierd look remained unchanged.

    Example 2:

    Article title:
    Collectible: “Custom Zombie Gameboy” (KodyKoala)

    Became:

    Collectible: “Custom Zombie
    Gameboy” (KodyKoala)

    Oddly, other long titles are unaffected and the issue seems to be more of a recent problem. Any advice or help in getting this issue sorted out would be most appreciated.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    WordPress automatically puts a non-breaking space between the last two words of a title to keep from having a single word orphaned on a line. There isn’t much of a way to fix this as the wordpress software parses the title you enter and will always put in that non-breaking space.

    It does it between the last two words of sentences too, to keep from having a single orphaned word from being at the beginning of a new line or the end of a paragraph.

    In most cases this practice works well, but in the case of the last word being a long word, such as Demotivational, a graphic designer/layout person would normally allot it to be orphaned on the second line. Sort of depends on how Type A the graphic designer/layout person would be.

  • Unknown's avatar

    And actually having had the great opportunity of working with an incredibly talented graphic designer for nearly 10 years, and based on that experience if I had to break this title,

    Humor: “Meth and Cookies…” (Very Demotivational)

    I would do it like this

    Humor: “Meth and Cookies…”
    (Very Demotivational)

  • Unknown's avatar

    And not to pic nits, but it should be De-motivational.

    Sorry, you got me in touch with my inner tech writer/editor/graphic designer.

  • Unknown's avatar

    You can edit the title and try pasting the HTML for a breaking space before the word you want to force into a new line:
    & e n s p ;
    (minus the spaces)

  • Unknown's avatar

    The Sacred Path:

    Lol. I just write the names as my sources choose to spell them :P Anyway, what you say makes total sense, but the fact that it broke it at “Cookies…” when it would have been much better to have broken it with at the (Very Demotivational) which was already seperated is just plain frustrating.

    panaghiotisadam:

    Tried your suggestion, but it didn’t work. Wasn’t really surprised though. In my experiance, HTML has never worked when for me on post titles.

  • Unknown's avatar

    Sorry, but my suggestion does work (when placed at the point you’ve got the invisible non-breaking space TSP explained about). Post titles in general don’t accept HTML tags and inline CSS, but they do accept HTML entities. As an example, try putting this in a post title and see if you’ll get a star or not:
    & # 9 7 3 4 ;
    (Minus the spaces, I repeat.)

  • Unknown's avatar

    panaghiotisadam:

    Tried the star and that worked fine. The space insert did not. When I edit it on dashboard, the space code does not show up in the title. It seemed like the change had been accepted, but I when previewed the actual page, the code shows up in the post title. I pulled all the spaces out like you suggested, but it didn’t work for some reason…

    & en sp ; <== this shows up in the post title (Minus the spaces)

  • Unknown's avatar

    Sorry, I don’t know what else to say: what you’re describing is not what I get in my tests blog (I even checked it using your theme, just in case there’s something quirky with the theme).

    Also just in case: what browser are you using?

  • Unknown's avatar

    I tried inputting the in a different post and still got the same result. The code still shows up in post titles. I’m not sure if I mentioned it, but my site is hosted on wordpress.com and is not self-hosted. I’ve noticed there’s a lot of differences between the two type of installs and I don’t know if this might be one of them.

    As for your last question, I use IE 9 for stuff like this. I tried it in Firefox and it didn’t make a difference…

  • Unknown's avatar

    This is the wordpress.com forum – we don’t give replies that pertain to self-hosted blogs (there’s a separate forum for those).

    Could you please try it in a post title and leave it on so we can check it?
    If you had ticked “Notify me of followup posts via e-mail” for this thread, are you sure you copied the snippet from here, not from the e-mail?

  • Unknown's avatar

    Yeah, I just tried it with Safari, Firefox and Opera in one of my test blogs using chunk and the breaking space worked fine.

  • Unknown's avatar

    Sorry of the slow reply. I’ve been ill. Here is a link to to a test post I slapped together with the HTML code inserted in the title. It disappeared this time and created a small space, but did not cause the post title to readjust to something more natural looking.

    Test: “Meth and Cookies…”   (Very Demotivational)

    Thank you all your help!

  • Unknown's avatar

    I’m seeing this (in both safari and Firefox):

    TEST: “METH AND COOKIES…”
    (VERY DEMOTIVATIONAL)

    Isn’t that what you wanted?

  • Unknown's avatar

    Huh…

    This is just plain weird. I checked it in two other browsers other than IE (Firefox and Opera) and it appears correctly. When it comes to IE, which is the one I primarily work out of, it still looks wrong. Perhaps it’s an issue with IE?

  • Unknown's avatar

    “IE”, “weird”, and “issues” are synonymous, because IE continues to ignore various web standards. Stick to it if you like having problems!

  • The topic ‘Weird title word wrapping issue’ is closed to new replies.