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.

Instructions
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.

Snippet Info

Tested with Wordpress v. 4.9.5
Last Modified: 15.05.2018
Last Reviewed: 15.05.2018
Review Status: Needs Review

How to add a custom WordPress post title truncate length
4 (80%) 9 votes
Please report broken snippets.
Report Broken Snippet
WP Engine