Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--TITLE OF PARENT PAGE-->
- <?php
- echo empty($post->post_parent) ? get_the_title($post->ID) : get_the_title($post->post_parent);
- ?>
- <!--LIST OF CHILD PAGES-->
- <?php
- if ($post->post_parent)
- $children = wp_list_pages("title_li=&child_of=" . $post->post_parent . "&echo=0");
- else
- $children = wp_list_pages("title_li=&child_of=" . $post->ID . "&echo=0");
- if ($children) {
- ?>
- <ul>
- <?php echo $children; ?>
- </ul>
- <?php } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement