i tried so many code snippets... but nothing worked. I need an menu what display sub and child pages like this:
On a page:
- Subpage 1 <-- You are here
- Subpage 2
-- Child 1
-- Child 2
-- Child 3
- Subpage 3
And
On a child page:
- Subpage 1
- Subpage 2
-- Child 1
-- Child 2 <-- You are here
-- Child 3
- Subpage 3
The menu should only display the sub and child pages of the top parent page. Not all Wordpress subpages.
Edit: For exmaple I tried this, but on a child or subpage, it displays nothing
<?php
global $post;
wp_list_pages( array(
'title_li' => '',
'child_of' => $post->ID,
'show_date' => 'modified',
'date_format' => $date_format
) );
?>