I would like to get a If for page Work and all its sub pages.
'<?php if ( is_page( 'work' ) && $post->post_parent ) { ?>'
do this
else ... do this.. end
I would like to get a If for page Work and all its sub pages.
'<?php if ( is_page( 'work' ) && $post->post_parent ) { ?>'
do this
else ... do this.. end
to do this for immediate children is quite easy, but if you have pages that are nested several layers deep, you'll need to write a function with a recursive conditional, to determine if the page is indeed a child of "work".
hi ucfknight10. yes, i got it nested. 2 levels
work
- websites
- client
try this function, and see if it works for you.
This topic has been closed to new replies.