Support » Fixing WordPress » Line break in title of post — not a web page

  • I have a post with a long title and want to impose a line break for appearance sake. (This is for a post not a web page.) I’ve read that for SEO purposes, you don’t want to include any HTLM tags in the title. Is there a proper way to do this?

    Thanks for your help.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Do you know that Title can only be 70 characters the rest will be cut off in search.
    Depending on how wide your content is the rest will be on 2nd line

    Yes, thanks.
    The title is now exactly 70 characters but the line breaks I want aren’t due to the character length. It’s due to the word groupings. The full title now appears on two lines and I want to control the line break so particular words appear side-by-side at the beginning of the second line.

    found this cool tutorial on word-wrap which should solve your problem and you wont need to put html tag in your title

    .your-title-class {
    word-wrap: break-word;
    }
    http://webdesignerwall.com/tutorials/word-wrap-force-text-to-wrap

    in above code you could specify width
    .your-title-class
    {
    width:100px;
    word-wrap: break-word;
    }
    wrap:and if you want to implement it in more dynamic way
    there is a php code for it

    http://php.net/manual/en/function.wordwrap.php

    I’ve been using <span> where I want the line break in the title of my posts. You don’t even need to close the tag and it works. Unfortunately, I just discovered that this pulls into the Pinterest image description for the page, so I am trying to see if there is a better option out there.

    There are lots of examples of multi-line post titles on my blog: oicmoments.com.

    Emily

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Line break in title of post — not a web page’ is closed to new replies.