Title: Limit String Lengh
Last modified: August 21, 2016

---

# Limit String Lengh

 *  [MZBS](https://wordpress.org/support/users/mzbs/)
 * (@mzbs)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/limit-string-lengh/)
 * Hello,
 * your plugin works perfect for me. Congratulations.
 * However I want to limit the string lengh of the venue and the location (city/
   country) in order that if the name is too long to see “…” at the end of the name
   instead of the long name.
 * I see the file songkick_presentable_event.php where the function is added but
   I am not sure how to implement the $str inside it because I am not PHP professional.
 * Can you help me to do that?
 * Thank you so much!
 * [http://wordpress.org/plugins/songkick-concerts-and-festivals/](http://wordpress.org/plugins/songkick-concerts-and-festivals/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [saleandro](https://wordpress.org/support/users/saleandro/)
 * (@saleandro)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/limit-string-lengh/#post-4331031)
 * WordPress has a formatting function to trim words:
    [http://codex.wordpress.org/Function_Reference/wp_trim_words](http://codex.wordpress.org/Function_Reference/wp_trim_words)
 * For characters, you’d have to implement your own method. If you google for it,
   you can find examples of how to do it. You need to use the substr function: [http://uk3.php.net/substr](http://uk3.php.net/substr)
   or [http://uk3.php.net/mb_substr](http://uk3.php.net/mb_substr)
 * Hope that helps!

Viewing 1 replies (of 1 total)

The topic ‘Limit String Lengh’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/songkick-concerts-and-festivals.svg)
 * [Songkick Concerts and Festivals](https://wordpress.org/plugins/songkick-concerts-and-festivals/)
 * [Support Threads](https://wordpress.org/support/plugin/songkick-concerts-and-festivals/)
 * [Active Topics](https://wordpress.org/support/plugin/songkick-concerts-and-festivals/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/songkick-concerts-and-festivals/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/songkick-concerts-and-festivals/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [saleandro](https://wordpress.org/support/users/saleandro/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/limit-string-lengh/#post-4331031)
 * Status: not resolved