WordPress limit character in the post title

  function titleLimitChar($title){
        if(strlen($title) > 55 && !(is_single()) && !(is_page())){ // not in single post page and page.
            $title = substr($title,0,55) . "..";
        return $title;
    add_filter( 'the_title', 'titleLimitChar' );

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.

DMCA.com Protection Status