Created
January 22, 2014 03:56
-
-
Save BeardedGinger/8553253 to your computer and use it in GitHub Desktop.
A simple function that allows you to conditionally check whether or not a page is a child page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function is_child( $page_id ) { | |
$child_check = get_post_ancestors( $page_id ); | |
if($child_check) { | |
return true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment