dimanche 1 février 2015

Show Child of Parent Page including all other parents


I'm trying to show on the menus as assigned in WP Menu backend however how is possible to load child of parent page without hiding the rest.


Example


Main-1

Main-2

Main-3


When Clicking on Main-1 should show


Main-1

---Sub-1

---Sub-2

Main-2

Main-3



<?php if (has_nav_menu( 'secondary' )) {
wp_nav_menu( array(
'container' => '',
'container_class' => '',
'menu_class' => '',
'menu_id' => 'menu-header-menu',
'fallback_cb' => 'wp_page_menu',
'items_wrap' => '<ul id="%1$s">%3$s</ul>',
'sort_column' => 'menu_order',
'theme_location' => 'secondary' ) );
}


This is the main code I'm using





Aucun commentaire:

Enregistrer un commentaire