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!
- The topic ‘Conditional Statement for Parent Pages Only?’ is closed to new replies.