PHP Hyphenation Function (2 posts)

  1. d4jaj1
    Posted 6 years ago #


    I'm using a plugin that pulls data from Twitter into a sidebar that is about 200px wide. In some cases, user's Tweets contain words (usually a name or URL) that is wider than the width of the sidebar. When this occurs, the offending word overlaps the sidebar and runs into the content of the page.

    I'm wondering if anyone has used a hyphenation function to breakup the content of the message. Use of a dash "-" isn't necessary - my guess is if I can detect the length of a give word in the string and if greater than 15 - use substr to create two (or more )strings.

    Any thoughts?

  2. kingjeffrey
    Posted 6 years ago #

    Try the wp-Typography plugin for automatic hyphenation.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.