I have a site where I am listing titles, and since each title is larger than our needed space I have to use the following code to break it down if it is larger than a certain amount of characters, and then show ...:
<?php $title = get_the_title(); echo mb_strimwidth($title, 0, 45, '...'); ?>
Is there a way to possibly list only a certain amount of words, instead of characters, so we can at least have a full word at the end of the title instead of a character and then ...?
Any help would be greatly appreciated. This is on a WP system.