I have a client who wants the following;
They have a series of pages, each of which have children. On the parent pages they want to show links to all the children. For this I am currently using this query;
<?php $args = array( 'post_type' => 'page', 'post_parent' => $post->ID, 'posts_per_page' => -1 ); $system_query = new WP_Query($args); while ($system_query->have_posts()) : $system_query->the_post(); ?> <!-- links to all this page's children --> <?php endwhile; wp_reset_postdata();?>
This works fine for the parent pages, but now the client wants to show the same set of links to show on the child pages aswell...
Is there a simple way to amend this query to allow that? Or will I have to write something else from scratch