How to add a custom WordPress post title truncate length

This snippet will allow you to define a custom truncate length of the WordPress post title in your template files.

Add this to your functions.php file.

And then add this to your template file where you want the post title to be displayed.

*note – the number 100 is the characters allowed before title is being truncated. You can define any differently character amount on each post title thru-out your templates.