Advertisement
Guest User

Untitled

a guest
Mar 20th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <?php
  2. global $post;
  3. $parent_title = get_the_title($post->post_parent);
  4. if ( is_page() && $post->post_parent )
  5. $children = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->post_parent . '&echo=0' );
  6. //$up = the_title();
  7. else
  8. $children = wp_list_pages( 'sort_column=menu_order&title_li=&child_of=' . $post->ID . '&echo=0' );
  9.  
  10. if ( $children ) {
  11.  
  12. echo '<ul class="secondary">';
  13. echo '<li id="firstBtn"><a href="'.get_permalink($post->post_parent).'">'.$parent_title.'</a></li>';
  14. echo $children;
  15. echo '</ul>';
  16. }
  17. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement