Home › Forums › Back End › WordPress – modify title tag. › Reply To: WordPress – modify title tag.
June 7, 2016 at 12:17 am
#242596
gulliver
Participant
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.