Created
June 3, 2015 13:14
-
-
Save jondueck/ac5ebc60ab5b71679e19 to your computer and use it in GitHub Desktop.
Wordpress: If parent is page id, set child page theme
This file contains hidden or 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 | |
if (134 == $post->post_parent) { | |
include (TEMPLATEPATH . '/page-mysubpagetemplate.php'); // Name this for your child page template name | |
exit(); | |
} else { | |
// Do something else | |
// You might want to stick your regular page.php code in here, or alternatively, you could call another template | |
}; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment