how to display part of a menu tree?

后端 未结 7 1638
无人共我
无人共我 2021-01-03 02:50

I\'m trying to deal with Wordpress 3.0. It\'s rather cool thing but I can\'t get on with one problem. For example, I have such menu tree. Menu tree is constructed from pages

7条回答
  •  清歌不尽
    2021-01-03 03:53

    I wrote this to print sub-navs of the pages you may be on. If you want to print out the sub-navigation for each of the pages, get the page parent instead of getting the ID. There would be more involved than that, but it's a start.

    $menu = wp_get_nav_menu_items( 'Primary Menu' );
    $post_ID = get_the_ID();
    echo "";`
    

提交回复
热议问题