Skip to content

Instantly share code, notes, and snippets.

@ahmedghazi
Created May 3, 2018 14:44
Show Gist options
  • Save ahmedghazi/c4add22a2a9715defbc587dfa0b75550 to your computer and use it in GitHub Desktop.
Save ahmedghazi/c4add22a2a9715defbc587dfa0b75550 to your computer and use it in GitHub Desktop.
$args_ = array(
"post_type" => "page",
"post_status" => "publish",
'posts_per_page' => get_option( 'posts_per_page' ),
'paged' => $paged,
"orderby" => "menu_order",
"order" => "DESC",
"post_parent" => get_the_ID()
);
$q_ = new WP_Query( $args_ );
while ( $q_->have_posts() ) : $q_->the_post();
include(locate_template('inc/card.php'));
endwhile;
wp_reset_query();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment