Guest User

Untitled

a guest
Sep 22nd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <?php
  2. /* Useful, for example, for showing "tabs" at the top of a page which show all children of that page */
  3.  
  4. if($post->post_parent)
  5. $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
  6. else
  7. $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0&depth=1");
  8. if ($children) { ?>
  9. <ul>
  10. <?php echo $children; ?>
  11. </ul>
  12. <?php } ?>
Add Comment
Please, Sign In to add comment