sybrew/the-seo-framework

Automatically Truncate Long Titles

Closed this issue · 3 comments

Hello,

We managed to have about 1,000 posts with long titles. Is there a custom function we can use to automatically truncate the titles to an acceptable limit?

Maybe the logic should work like:

if no. of characters > value then
truncate...
end if

sybrew commented

Titles may be of any length and serve purposes beyond SEO, such as displaying in the browser tab, reading assistance (accessibility), RSS feeds, etc.

Truncating the titles is not a good idea for that reason.

If the title is unacceptably long for search engines, they'll change it for you while still considering every word you put into the title. I don't think there's any harm done here.

Understanding this, do you still wish to put forth this change?

If there is no harm and search engines will change the title, then I guess its fine? It's just that the SEO Framework plugin marks long titles with red color, so I presumed that would be a problem..

sybrew commented

It is a problem when you want search engines to display exactly your preferred title because when we mark it red, it almost definitely won't. But otherwise, it's OK -- especially for generated or quickly pushed content.

To learn more, see https://www.searchenginejournal.com/google-title-tag-length/400682/.