Support » Fixing WordPress » Show grandparents in page title

  • In my html header I want to use a conditional title element to show the path of a page:

    I’m currently using a conditional title element to show parents of a page:

    if($post->post_parent) {$parent_title = get_the_title($post->post_parent); echo $parent_title.' : ';}

    Can that be adapted, or is there an alternative, to show the full path?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show grandparents in page title’ is closed to new replies.