Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $wp_query;
- if( empty($wp_query->post->post_parent) ) {
- $parent = $wp_query->post->ID;
- } else {
- $parent = $wp_query->post->post_parent;
- } ?>
- <?php if(wp_list_pages("title_li=&child_of=$parent&echo=0" )): ?>
- <div>
- <ul>
- <?php wp_list_pages("title_li=&child_of=$parent" ); ?>
- </ul>
- </div>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement