The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End WordPress – modify title tag. Reply To: WordPress – modify title tag.


Thanks. Appreciated. :-)
Yes, that does work.
I’ve read about pre_get_document_title but not yet been able to understand it enough to be able to use it.

For example, my old header (which used wp_title) had a conditional to add page numbers to multi-page posts/pages.

// Add a page number if necessary:
if ($paged >= 2 || $page >= 2 ) echo ' ' . sprintf( __('(page %s)'), max($paged, $page) );

I still don’t know how to modify things to include this with title-tag. And I’ve never been able to prepend some pages with the parent/grandparent name.