Skip to content

Instantly share code, notes, and snippets.

@BeardedGinger
Created January 22, 2014 03:56
Show Gist options
  • Save BeardedGinger/8553253 to your computer and use it in GitHub Desktop.
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
<?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