Skip to main content
Login Join
Snippet · PHP

Limit SEO Title to 60 characters

Shared by Divyesh kakrecha · June 6, 2026 · @aioseo_title

25 views
Back to Snippets

This filter limits the SEO Title length to 60 characters throughout the website

add_filter( 'aioseo_title', 'aioseo_filter_title' );
function aioseo_filter_title( $title ) {
   if ( strlen($title) > 60 ) {
      $title = substr($title, 0, 60);
   }
   return $title;
}
Know a different way to do this? Add your approach as a variation so folks can compare them side by side.
Submit a variation

0 comments