WordPress.org

Ready to get started?Download WordPress

Forums

Show grandparents in page title (3 posts)

  1. gulliver
    Member
    Posted 2 years ago #

    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?

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

  3. gulliver
    Member
    Posted 2 years ago #

    Thanks.

    I looked there before posting, and although I can use that in a page I don't understand enough to be able to include it in a conditional title.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.