Any ideas why my wordwrap isn't working. If I just use plain text instead of calling the title it works fine. The title is displaying property but not wrapping. <?php $strr = the_title(); echo wordwrap($strr, 10, "<br />\n"); ?> I have tried all kinds of alternatives but I'm still learning with PHP. Thanks
Try this: <?php $strr = the_title(,,FALSE); echo wordwrap($strr, 10, "<br />\n"); ?> You need the FALSE to use it with PHP, because the default is TRUE: http://codex.wordpress.org/Template_Tags/the_title Also, it needs to be inside the Wordpress loop. Use get_the_title(ID) when outside of the loop.