Hi.
I have this code that works to some extent:
<?php
if ( is_page('about') || $post->post_parent == '2') {
get_sidebar_about();
}
elseif ( is_page('somethingelse') || $post->post_parent == '155') {
get_sidebar_somethingelse();
}
elseif ( is_page('careers') || $post->post_parent == '160') {
get_sidebar_careers();
}
else {
get_sidebar();
}
?>
So if I have http://www.mydomain.com/about, it loads the sidebar I want.
If I have http://www.mydomain.com/about/page1, it also works fine.
However, if I have http://www.mydomain.com/about/page1/another-page, it loads the normal sidebar.
So I need to check for any subpages/children of the url.
Any help? Thanks