自定义菜单中缺少Current_Page_Item 时间:2012-01-06 作者:stimsonm 我在侧边导航中使用了新的自定义菜单,它只在UL\'s 但不使用current_page_item 就像你使用wp_list_pages(). 我有3个级别,只想显示您所在页面的子菜单,使用wp_list_pages() 但我不能用自定义菜单?有人能帮忙吗?谢谢 1 个回复 SO网友:Chip Bennett 当前项CSS类由生成wp_nav_menu() 是.current-menu-item. 然而wp_nav_menu() 还具有向后兼容性wp_page_menu()/wp_list_pages(), 和输出.current_page_item (如果当前上下文是page 当然是post类型)。因此,有几种可能性:当前上下文不是静态页面wp_nav_menu() 输出,它不会为输出CSS类.current*. 结束 文章导航