I’m trying to list the sub pages of a parent page on the parent page and its subpages, as I want this to be separate from the main navigation.
I’m using one custom menu (the basic primary_navigation), in the past I have used wp_list_pages and a snippet from the codex to do so (php is not my strength!) but this is not working correctly.
Ill buy you a cookie (or a beer!) if you can help me out!
just an example of a div you could insert the nav into
php wp_nav_menu(array( ‘depth’ => ‘2’ )); ?>
example css, this is css from the example site above. This solution is really just calling out the main nav again and then using css to show what you want it to. You should be able to take it from here. Any questions let me know or refer back to the site example
.breadcrumbs ul > li.active.dropdown > a {display: none;}
.breadcrumbs ul > li.active.dropdown > ul.dropdown-menu> li {list-style: disc; height: 100%;}
.breadcrumbs ul > li.active.dropdown > ul.dropdown-menu> li > a {padding: 0; line-height: inherit;}
.breadcrumbs ul > li.active.dropdown > ul.dropdown-menu {float: none; display: block; background: none; border: medium none; border-radius: 0 0 0 0; box-shadow: none; display: block; top: 0; width: 100%; height: 100%;}
.breadcrumbs ul > li.active.dropdown > ul.dropdown-menu > .active > a, .breadcrumbs ul > li.active.dropdown > ul.dropdown-menu > .active > a:hover, .breadcrumbs ul > li.active.dropdown > ul.dropdown-menu > .active > a:focus {background: none;}
.breadcrumbs ul > li.active.dropdown > ul.dropdown-menu > li > a:hover, .breadcrumbs ul > li.active.dropdown > ul.dropdown-menu > li > a:focus {background: none; color: #000;}
@matthewlyle
Is this grabbing all the sub-pages associated with the parent page, or is it reflecting the main navigation showing only the subpages listed in the primary menu?
Above is what I used to show only the sub pages listed in the primary menu for the site
Sorry I’m not sure what you’re asking. He asked for something separate from the primary navigation that will list the parent link and all relevant subpages. That’s what the snippet I posted does. It does this whether you’re on the parent page or one of the subpages. It has nothing to do with the main navigation.