2012-06-18, 08:42:52
Hi and welcome to the forums...
Without having to install any plugins you could put the following function into your theme/functions.php file (create one if it doesn't exist)
Then in your theme, put this in your sidebar:
Change $id to a specific page slug to get a specific subpages, otherwise it will create subpages for whatever page your on.
Without having to install any plugins you could put the following function into your theme/functions.php file (create one if it doesn't exist)
Code:
function getSubMenu($page){
$children=getChildren($page);
foreach ($children as $subpage){
$title=returnPageField($subpage,'menu');
$url=returnPageField($subpage,'slug');
echo '<li><a href="index.php?id='.$url.'">'.$title.'</a></li>';
// or use below if you have fancy urls on
//echo '<li><a href="/'.$url.'">'.$title.'</a></li>';
}
}
Then in your theme, put this in your sidebar:
Code:
<ul>
<?php getSubMenu($id); ?>
</ul>
Change $id to a specific page slug to get a specific subpages, otherwise it will create subpages for whatever page your on.