I need to hide a piece of code from showing up in certain pages. These pages are all child and siblings of the parent page with ID 8194.
To hide the code inside the child page I'm using if ( get_post_field( 'post_parent' ) != 8194 ), but the issue is that there are several sibling pages and that code isn't working on them, it only works in the child page.
This is my page hierarchy:
Parent page 1
- Child page 1
-- Sibling page 1
-- Sibling page 2
...
-- Sibling page 10
How can I hide the code in the sibling pages as well?
Thank you