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
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
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.
Worked perfectly, thank you!
What if you want to use it with previous_post_link() or wp_get_archives()? Help please.
This topic has been closed to new replies.