I'm working on project, where I have different widgets on pages and also different order. Example - on About page I may have chat widget, then e-mail sign-up widget, then testimonials widget. On other page I may have testimonials widget only, followed by chat widget. I'm using this code to show widgets on pages and children pages
<?php if ( is_front_page() ){ ?>
<?php }elseif ( is_page('areas-we-service') || $post->post_parent == '16' ){ ?>
Do stuff here
<?php }elseif ( is_page('products') || $post->post_parent == '14' ){ ?>
Do stuff here
<?php }else{ ?> <?php } ?>
and it work. The problem is that it not work on subchildrent pages e.g. Product -> Product 1 -> Product 1.1 On Product 1.1 I don't have widgets. So, my question is, how to change code above to show widgets on subchildren, sub-subchildren etc. pages.
Thank you!