第二十七期主题下拉菜单问题 时间:2017-10-14 作者:adnan 我正在使用2017来构建我自己的设计下拉菜单,这对我来说并不适用当我悬停在父对象上时,没有显示任何内容这里是mu自己的HTML输出<div class="headermenu"> <div class="headermenu_wrap"> <div class="menu-primary1-container"><ul id="menu-primary1" class="nav-menu"><li id="menu-item-115" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-115"><a href="http://127.0.0.1/sh/1/?page_id=113">search1</a></li> <li id="menu-item-121" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-121"><a href="#">sub<svg class="icon icon-angle-down" aria-hidden="true" role="img"> <use href="#icon-angle-down" xlink:href="#icon-angle-down"></use> </svg></a> <ul class="sub-menu"> <li id="menu-item-116" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-116"><a href="http://127.0.0.1/sh/1/?page_id=77">search<svg class="icon icon-angle-down" aria-hidden="true" role="img"> <use href="#icon-angle-down" xlink:href="#icon-angle-down"></use> </svg></a> <ul class="sub-menu"> <li id="menu-item-117" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-117"><a href="http://127.0.0.1/sh/1/?page_id=20">random<svg class="icon icon-angle-down" aria-hidden="true" role="img"> <use href="#icon-angle-down" xlink:href="#icon-angle-down"></use> </svg></a> <ul class="sub-menu"> <li id="menu-item-118" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-has-children menu-item-118"><a href="http://127.0.0.1/sh/1/?page_id=29">random1<svg class="icon icon-angle-down" aria-hidden="true" role="img"> <use href="#icon-angle-down" xlink:href="#icon-angle-down"></use> </svg></a> <ul class="sub-menu"> <li id="menu-item-119" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-119"><a href="http://127.0.0.1/sh/1/?page_id=33">random3</a></li> </ul> </li> <li id="menu-item-120" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-120"><a href="http://127.0.0.1/sh/1/?page_id=113">search1</a></li> </ul> </li> </ul> </li> </ul> </li> </ul></div> <div class="social_header-inner"> <ul class="social_header-ul"> <li><a href="http://127.0.0.1/sh/1/&feed=rss2" class="social_links_a" target="_blank"> <i class="fa fa-rss-square"></i></a></li> <li><a href="#" class="social_links_a" target="_blank"> <i class="fa fa-facebook-square"></i></a></li> <li><a href="##" class="social_links_a" target="_blank"> <i class="fa fa-twitter-square"></i></a></li> <li><a href="###" class="social_links_a" target="_blank"> <i class="fa fa-youtube-square"></i></a></li> <li><a href="####" class="social_links_a" target="_blank"> <i class="fa fa-google-plus-square"></i></a></li> <li><a href="#####" class="social_links_a" target="_blank"> <i class="fa fa-instagram"></i></a></li> <li><a href="######" class="social_links_a" target="_blank"> <i class="fa fa-linkedin-square"></i></a></li> <li><a href="#######" class="social_links_a" target="_blank"> <i class="fa fa-flickr"></i></a></li> </ul> </div> </div> </div></div> 这是我从前端视图源代码加载的脚本<script type=\'text/javascript\' src=\'http://127.0.0.1/sh/1/wp-includes/js/jquery/jquery.js?ver=1.12.4\'></script> <script type=\'text/javascript\' src=\'http://127.0.0.1/sh/1/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1\'></script>新的一步,我发现了全球。JS和导航。没有调用JS,所以我编辑了函数。php现在都调用了 1 个回复 SO网友:adnan 解决方法通常是我用这个来调用菜单<?php wp_nav_menu( array( \'theme_location\' => \'top\', \'menu_class\' => \'nav-menu\', \'fallback_cb\' => \'tie_nav_fallback\' ) ); ?> 如果我记得的话,我的HTML工作人员会一直工作到十二岁,但是十七岁的时候我应该把菜单叫进去<div class="main-navigation"> 结束 文章导航