WordPress.org

Ready to get started?Download WordPress

Forums

PHP Hyphenation Function (2 posts)

  1. d4jaj1
    Member
    Posted 4 years ago #

    Hello,

    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
    Member
    Posted 4 years ago #

    Try the wp-Typography plugin for automatic hyphenation.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.