0
取決於你在該網站中的哪些部分,我服務於WordPress的不同的頁眉的孫子,「住宅」,「商業」或其他使用下面的代碼:WordPress的如果兒童與頁
<?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();
}
?>
儘管我需要將它擴展到與孫子們一起工作,所以再往下一級。有人有想法嗎?