I really can't get the right practices from official docs. I think it's a complete mess.
At some point, they started to say to activate the title-tag feature: after_setup_theme >
add_theme_support('title-tag');
Ok. At this point they stated we should delete the
<title>
tag from page and stop usingwp_title()
. Perfect.So we had to use the
'wp_title'
filter to modify our titles. Right. I did, that worked, once upon a time.Then they said '
'wp_title'
filter was deprecated, and we should have usedpre_get_document_title
and other filters. Wow, great. Currently they seem not to work, though.Then they said '
'wp_title'
filter was 'reinstated until alternative usages have been identified and a path forward for them defined' Sexy.
But if I look into the core code, I can see that the 'title-tag' has no filters to modify its output. So if I want custom coded texts inside my titles, should I use wp_title() again and disable 'title-tag' support?
Really, can someone shed a definitive light on this topic?