Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. Parentpage (Templatename: parentpage)
  2. - Child A (Templatename: childpage)
  3. - Child B (Templatename: childpage)
  4. -- SecondChild B (Templatename: secondchildpage)
  5. - Child C (Templatename: childpage)
  6.  
  7. <?php
  8. getchilds = array(
  9. 'parent' => $post->ID,
  10. 'child_of' => $post->ID,
  11. 'sort_column' => 'menu_order',
  12. 'sort_order' => 'ASC'
  13. );
  14.  
  15. $postliset = get_pages($getchilds);
  16. foreach ($postliste as $post) {
  17. echo $post->post_content;
  18. }
  19. ?>
  20.  
  21. <div class="childpagestest">
  22. [...]
  23. <?php the_content(); ?>
  24. [...]
  25. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement