第二十七期主题下拉菜单问题

时间:2017-10-14 作者:adnan

我正在使用2017来构建我自己的设计下拉菜单,这对我来说并不适用

menumenu design

当我悬停在父对象上时,没有显示任何内容

这里是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">

结束
第二十七期主题下拉菜单问题 - 小码农CODE - 行之有效找到问题解决它

第二十七期主题下拉菜单问题

时间:2017-10-14 作者:adnan

我正在使用2017来构建我自己的设计下拉菜单,这对我来说并不适用

menumenu design

当我悬停在父对象上时,没有显示任何内容

这里是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">

相关推荐

WP管理员缺少图标、大量的JavaScript错误,但仅当SCRIPT_DEBUG为FALSE时

我可以访问一台Linux/Apache服务器,在那里我试图部署WordPress。为了避免这个错误,我用默认的2017主题和所有禁用的插件对其进行了测试。当我以管理员身份登录到任何wp admin页面时,左侧导航中的大多数图标都会丢失,选中的复选框没有任何复选框(例如),浏览器控制台会充满JavaScript错误。例如,在仪表板页面上,没有任何图标可见,错误控制台的内容如下:Uncaught TypeError: a.widget is not a function at load-scripts