我希望我的主导航栏显示菜单项,在每个项的标题下都有对所述菜单的简短描述。
为此,我希望将菜单项的“title”属性注入下面的“after”函数中。不太确定如何执行此操作:
// the main menu
function bones_main_nav() {
// display the wp3 menu if available
wp_nav_menu(array(
\'container\' => false, // remove nav container
\'container_class\' => \'menu clearfix\', // class of container (should you choose to use it)
\'menu\' => __( \'The Main Menu\', \'bonestheme\' ), // nav name
\'menu_class\' => \'nav top-nav clearfix\', // adding custom nav class
\'theme_location\' => \'main-nav\', // where it\'s located in the theme
\'before\' => \'\', // before the menu
\'after\' => \'\', // after the menu
\'link_before\' => \'\', // before each link
\'link_after\' => \'\', // after each link
\'depth\' => 0, // limit the depth of the nav
\'fallback_cb\' => \'bones_main_nav_fallback\' // fallback function
));
} /* end bones main nav */
我还担心这会干扰下拉功能。任何帮助都将不胜感激。