I'm trying to exclude one child from the children of a parent. What do I need to change here? thanks
if ( $post->post_parent == '4426' || in_array( '4426', $post->ancestors) && (!is_page('4430') ) { // Who We Are
//do something
}
Maybe it's just a matter of parentheses.
if ( ( $post->post_parent == '4426' || in_array( '4426', $post->ancestors) ) && !is_page(4430) ) { // Who We Are
//do something
}
I'm assuming is_page
accepts an Integer being the page ID and 4430
is not the slug or page title.
4430
? Are we in a loop here?