Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- global $post;
- $parent_title = get_the_title($post->post_parent);
- if ( is_page() && $post->post_parent )
- $children = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0' );
- //$up = the_title();
- else
- $children = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0' );
- if ( $children ) {
- echo '<ul class="secondary">';
- echo '<li id="firstBtn"><a href="'.get_permalink($post->post_parent).'">'.$parent_title.'</a></li>';
- echo $children;
- echo '</ul>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement