Display child-page links in sidebar on both Parent Pages AND Child Pages
The following fixed the issue for me: <?php switch ($isBlogsPostPage){ case true: $parentID=get_correct_id($post, $isBlogsPostPage); break; default: $parentID=get_correct_id($post); } $args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => 10, ‘post_parent’ => $parentID, ‘orderby’ => ‘menu_order’ ); $parent = new WP_Query( $args ); if ( true ) : ?> <section class=”links border shadow”> <ul> <?php while ( $parent->have_posts() … Read more