I have used '0' == $post->post_parent
successfully in my templates to target top level pages.
However, I cannot seem to target all pages EXCEPT top level pages:
<?php
if ( '0' !== $post->post_parent ) {
include 'siblings.php';
}
?>
Using the code above, the file is still included in top level pages.
Note, I can get it working using the code below, but I want to keep it flexible and not have to specify IDs:
<?php
if ( !is_page( array( 8, 10, 12 )) && (is_tree(8) || is_tree(10) || is_tree(12)) ) {
include 'siblings.php';
}
?>
Hope someone can help!