I need some help with wordpress.
The idea is create multioptional navigation in sidebar.
Hierarchy is looks like this:
<ul>
<li>First Page
<ul>
<li>First SubPage</li>
<li>Second SubPage
<ul>
<li>First Sub-SubPage</li>
<li>Second Sub-SubPage</li>
<li>Third Sub-SubPage</li>
</ul>
</li>
</ul>
</li>
<li>Second Page</li>
<li>Third Page
<ul>
<li>First SubPage</li>
<li>Second SubPage
<ul>
<li>First Sub-SubPage</li>
<li>Second Sub-SubPage</li>
<li>Third Sub-SubPage</li>
</ul>
</li>
</ul>
</li>
</ul>
But i need some features.
When i on First Page, i want see only subpages of this page, not all pages in menu.
How i can resolve this problem?
Thanks
Make use of the function
get_pageshttp://codex.wordpress.org/Function_Reference/get_pagesYou can use the following function. Call it in the sidebar with
$page_id as <current page id>.Update 1:
Added
'parent' => $page_idattribute in third line, so only first level child are returned.