Can someone please show me how I can get a page to show all subpages filed under it.
Do I need to create a new template?
Thanks!
Can someone please show me how I can get a page to show all subpages filed under it.
Do I need to create a new template?
Thanks!
Ok, I've tried
<?php
if($post->post_parent)
$children = wp_list_pages("title_li=&child_of=".$post->post_parent."&echo=0");
else
$children = wp_list_pages("title_li=&child_of=".$post->ID."&echo=0");
if ($children) { ?>
<ul>
<?php echo $children; ?>
</ul>
<?php } ?>
but it doesn't work because it comes after a widget. Any help?
There is a plug in that I found. I haven't used it so I don't know how good it is.
http://wordpress.org/extend/plugins/ryans-suckerfish-wordpress-dropdown-menu/
Thanks for your advice, I'm trying to display it in the content area (an unordered list), so I don't know if this will work.
Take care!
oh - i thought you meant a drop down menu. I'm not sure about the coding for that. good luck
http://codex.wordpress.org/Template_Tags/wp_list_pages#List_Sub-Pages
(note, it should be in the template, not in the content!)
This topic has been closed to new replies.