if child page help
-
Basically, I want to write an if statement that says:
if (page is titled “About” or page is a child of the “About” page)
// do this
else
// do thisWhat is the code I need to check if the page is a child of the “About” page? This is what I have so far:
<?php if (is_page('About')) : ?> // do this <?php else : ?> // do this <?php endif ?>
Help is appreciated.
Viewing 9 replies - 1 through 9 (of 9 total)
Viewing 9 replies - 1 through 9 (of 9 total)
- The topic ‘if child page help’ is closed to new replies.