Skip to content

Instantly share code, notes, and snippets.

@dospuntocero
Last active June 27, 2019 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dospuntocero/aca9cc609bac68979799674b818a1c13 to your computer and use it in GitHub Desktop.
Save dospuntocero/aca9cc609bac68979799674b818a1c13 to your computer and use it in GitHub Desktop.
show children pages of current page
<div class="solutions-holder">
<div class="wrapper">
<?php
$args = [
'post_parent' => $post->ID,
'post_type' => 'page',
'orderby' => 'menu_order'
];
$child_query = new WP_Query( $args );
while ( $child_query->have_posts() ) : $child_query->the_post();
get_template_part('partials/solution');
endwhile;
wp_reset_postdata();
?>
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment