Print Submenu in Each Page

<?php
if (is_page()) {
  $page = $post->ID;
  if ($post->post_parent) {
    $page = $post->post_parent;
  }
   $children=wp_list_pages( ‘child_of=’ . $page . ‘&title_li=’ );
  if ($children)
      {
    $output = wp_list_pages (‘child_of=’ . $page . ‘ ‘);
  }
}
echo $output;
?>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s