If is this page or is child of it
A client of mine needed to display a certain HTML element (a social media icon) only on certain pages and children of those pages. Put this in your functions.php file: function ar_check_family( $page_id ) { global $post; if ( is_page() && ( $post->post_parent == $page_id || is_page( $page_id ) ) ) { return true; } […]