Advertisement
Guest User

Untitled

a guest
Mar 5th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. <?php
  2. global $wp_query;
  3. if( empty($wp_query->post->post_parent) ) {
  4. $parent = $wp_query->post->ID;
  5. } else {
  6. $parent = $wp_query->post->post_parent;
  7. } ?>
  8. <?php if(wp_list_pages("title_li=&child_of=$parent&echo=0" )): ?>
  9. <div>
  10. <ul>
  11. <?php wp_list_pages("title_li=&child_of=$parent" ); ?>
  12. </ul>
  13. </div>
  14. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement