Using following code you can able to display the subpages of parent page.

<?php $subpages = wp_list_pages(‘title_li=&child_of=’.$post->ID.’&echo=0′); ?>

<?php if ($subpages) { ?>
<ul>
<?php echo $subpages; ?>
</ul>
<?php } ?>
Note: This code you need to copy paste in loop only.

Using following code you can able to display the subpages and subpages of that.

<?php
if($post->post_parent)
$subpages = wp_list_pages(“title_li=&child_of=”.$post->post_parent.”&echo=0″);
else
$subpages = wp_list_pages(“title_li=&child_of=”.$post->ID.”&echo=0″);
if ($subpages) { ?>
<ul>
<?php echo $subpages; ?>
</ul>
<?php } ?>

Using css you modify the UI of menu.

building a wordpress blog

More details you can found on following page
http://codex.wordpress.org/Template_Tags/wp_list_pages

Written by WPAPI

My name is Purab Kharat, Here is my Personal Blog: digcms.com. Work as an Senior Technical Lead at Smartsourcing Global Pvt Ltd in Princeton, NJ, USA. I contributor of many wordpress plugins and Drupal Modules. I am core developer of Drupal. Connect to purab on LinkedIn or Follow @purab on Twitter or Follow me on Google+ or Write Mail to purabdk@gmail.com or Chat with me on Skype : purabdk

This article has 1 comment

  1. Emanuel Acencio Reply

    I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favorites website list and will be checking back soon. Please check out my site as well and let me know what you think.

Leave a Comment

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>