How to add … after a particular word/character limit to the title
the_title() prints/retrieve the title while get_the_title() retrieve the title. So your code should be something like this. <div class=”case-breaking__content”> <p> <?php $out = strlen(get_the_title()) > 50 ? substr(get_the_title(),0,50).”…” : get_the_title(); echo $out; ?> </p> </div> Note you can use the_title() but it is not recommended here to keep the code clean. <div class=”case-breaking__content”> <p> <?php … Read more