의 손자, "주거", "비즈니스"또는 다음 코드를 사용하여 다른 :워드 프레스의 경우 아동 및 페이지
<?php
/*
Template Name: Package
*/
if (is_page('business') || $post->post_parent == "17")
{
get_header('business');
}
else if (is_page('residential') || $post->post_parent == "19")
{
get_header('residential');
}
else
{
get_header();
}
?>
을 손자와 함께 일하기 위해 그것을 확장해야하지만, 또 다른 수준 아래로 내려 가야합니다. 누구나 아이디어가 있습니까? 즉
가 가 가if(in_array('19', get_ancestors($post->ID, 'page')){...}
가