I would like to show all posts from a custom post type on one page with the ordering exactly like in the backend. I get the right ordering with wp_list_pages, but of course without the content.
parent
1.1-> sibling
1.2-> sibling
parent
2.2-> sibling...
etc.
But I cant figure out how to set the order correctly with orderby.
Here is my code
$args = array(
'depth' => '0',
'post_type' => 'manual_documentation',
'post_stauts' => 'publish',
'orderby' => 'parent menu_order',
'posts_per_page' => 10
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
echo '<h1>';
the_title();
echo '</h1>';
echo '<div class="entry-content">';
the_content();
echo '</div>';
endwhile;
The result:
Parent
Parent
Sibling Sibling Sibling
Does anybody know how to solve this problem? Thanks!
wp_list_pages
?