Title: Substr() WP functions?
Last modified: August 18, 2016

---

# Substr() WP functions?

 *  Resolved [bcreighton](https://wordpress.org/support/users/bcreighton/)
 * (@bcreighton)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/substr-wp-functions/)
 * Is there a way to use the substr() function on WP functions like the_content()
   and the_title()?
 * If I try and use it, WP completely ignores it and displays the full string.
 * Thanks

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Peter Westwood](https://wordpress.org/support/users/westi/)
 * (@westi)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/substr-wp-functions/#post-643560)
 * `the_content` and `the_title` echo the string out directly.
 * You want to use `get_the_content` and `get_the_title` and apply the substr to
   what is returned.
 *  Thread Starter [bcreighton](https://wordpress.org/support/users/bcreighton/)
 * (@bcreighton)
 * [18 years, 7 months ago](https://wordpress.org/support/topic/substr-wp-functions/#post-643561)
 * Worked perfectly, thank you!
 *  [ermitanyo](https://wordpress.org/support/users/ermitanyo/)
 * (@ermitanyo)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/substr-wp-functions/#post-643790)
 * What if you want to use it with previous_post_link() or wp_get_archives()? Help
   please.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Substr() WP functions?’ is closed to new replies.

 * 3 replies
 * 3 participants
 * Last reply from: [ermitanyo](https://wordpress.org/support/users/ermitanyo/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/substr-wp-functions/#post-643790)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
