WordPress.org

Ready to get started?Download WordPress

Forums

Line break in title of post -- not a web page (6 posts)

  1. hchewning
    Member
    Posted 1 year ago #

    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.

  2. govpatel
    Member
    Posted 1 year ago #

    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

  3. hchewning
    Member
    Posted 1 year ago #

    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.

  4. cinghaman
    Member
    Posted 1 year ago #

    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

  5. cinghaman
    Member
    Posted 1 year ago #

    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

  6. Emily
    Member
    Posted 9 months ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Topic