Support » Fixing WordPress » Conditional Statement for Parent Pages Only?

  • Resolved bunnyhello

    (@bunnyhello)


    I have a template page I am working on for several different pages, some of which are parent pages, most of which are children and grandchildren.

    The parent pages don’t have a title, the children and grandchildren do have the title.

    How would I write a conditional tag that would only call the <h1><?php the_title(); ?></h1> when the page is a child or grandchild?

    Thanks in advance!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conditional Statement for Parent Pages Only?’ is closed to new replies.