Using conditional titles with title-tag rather than wp_title()
, how do I add the immediate parent or ultimate grandparent to the title and,for multi-paged posts, the page number?
When using wp_title()
, this added page numbers to multi-page posts:
if ($paged >= 2 || $page >= 2 ) echo ' ' . sprintf( __('(page %s)'), max($paged, $page) );
It doesn't work with title-tag. And I've never known how to prepend with parent/grandparent
wp_title()
does that too. Please show us your exact code. – fuxia♦ Jun 3 '16 at 5:24