Advertisement
Guest User

Untitled

a guest
May 26th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.30 KB | None | 0 0
  1. if($post->post_parent)
  2.  
  3.                       $children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
  4.  
  5.                       else
  6.  
  7.                       $children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
  8.  
  9.                       if ($children) { ?>
  10.  
  11.                       <ul class="sub-menu">
  12.  
  13.                       <?php echo $children; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement