I have a wordpress site with titles, and if the title has more than 50 characters I need to add an ellipsis (...) at the end of the title and stop the title at 50 characters. Be
use 'strlen'
eg: 50) ? (substr(get_the_title(), 0, 50) . "...") : get_the_title())?>