after along search a found a code to display only the sub-menu depending on the current page…
This is what did it: <?php $html = wp_page_menu('title_li=&child_of='.$post->ID. '&echo=0'); echo $html; ?>
But now I don’t have a clue how to style this menu. Can I add something to assign a css id/class?
I resolved it by adding &menu_class=nav. wherenav is the css class.
So, it now looks like this: <?php $html = wp_page_menu('menu_class=nav&title_li=&child_of='.$post->ID. '&echo=0' ); echo $html; ?>
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘style wp_page_menu’ is closed to new replies.