Bootstrap汉堡菜单切换不起作用

时间:2017-11-03 09:10:08

标签: html css wordpress

我在我的所有项目中都使用了bootstrap。但在我的最新项目中,移动视图中的汉堡菜单正在显示,但即​​使我点击它,它也不会切换。 它曾经工作,但现在不是,我似乎无法找到错误。 请帮助我们,谢谢你们 继承我的代码:

<!doctype html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="">
<head>
   <meta charset="utf-8">
   <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
   <title>The Curated</title>
   <meta name="description" content="">
   <meta name="viewport" content="width=device-width, initial-scale=1">
   <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
   <link rel="shortcut icon" href="<?php the_field('favicon','options'); ?>">
</head>

<body>
<div class="">
    <header id="header">
        <div class="navbar-holder">
            <!-- if you want to customize the nav, just add class and call it on css -->
            <div class="top-header">
                <div class="container">
                    <div class="social">
                        <ul>
                            <?php if(get_locale() == "de_DE") { ?>
                                <li class="header-titler">FOLGE UNS</li>
                                <li><a href="<?php the_field('linkedin_link', 'options') ?>" target="_blank"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>
                            <?php } else { ?>
                                <li class="header-titler">Follow us</li>
                                <li><a href="<?php the_field('linkedin_link', 'options') ?>" target="_blank"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>
                            <?php } ?>
                        </ul>
                    </div>
                    <div class="language">
                        <?php
                            // get the post ID in en
                            $en_post_id = icl_object_id($post->ID, 'post', FALSE,'en');
                            $ed_post_id = icl_object_id($post->ID, 'post', FALSE,'de');
                            // get the post object
                            $en_post_obj = get_post( $en_post_id);
                            $ed_post_obj = get_post( $ed_post_id);
                            // get the name
                            $en_post_name = $en_post_obj->post_name;
                            $ed_post_name = $ed_post_obj->post_name;
                        ?>
                        <ul>
                            <li><a href="<?php global $post; echo $en_post_name; ?>">EN<img src="<?php bloginfo('template_url') ?>/img/flag-en.png"></a></li>
                            <li><a href="<?php global $post; echo $ed_post_name; ?>">DE<img src="<?php bloginfo('template_url') ?>/img/flag-ed.png"></a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <nav role="navigation" class="navbar navbar-default">
                <div class="container">
                    <!-- Brand and toggle get grouped for better mobile display -->
                    <div class="navbar-header">
                        <button type="button" data-target="#navbarCollapse" data-toggle="collapse" class="navbar-toggle">
                            <span class="sr-only">Toggle navigation</span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                            <span class="icon-bar"></span>
                        </button>
                        <a href="<?php echo esc_url( home_url( '/') ); ?>" class="navbar-brand">
                            <img src="<?php the_field('logo', 'options') ?>">
                        </a>
                    </div>
                    <!-- Collection of nav links, forms, and other content for toggling -->
                    <div id="navbarCollapse" class="collapse navbar-collapse">
                        <ul class="nav navbar-nav navbar-right">

                    <?php if(get_locale() == "de_DE") { ?>
                        <?php wp_nav_menu( array( 'theme_location' => 'header-german-menu', 'container' => 'false', 'items_wrap' => '<ul class="nav navbar-nav navbar_customize">%3$s</ul>' ) ); ?>
                    <?php } else { ?>
                       <?php wp_nav_menu( array( 'theme_location' => 'header-menu', 'container' => 'false', 'items_wrap' => '<ul class="nav navbar-nav navbar_customize">%3$s</ul>' ) ); ?>
                    <?php } ?>
                         <!--    <li><a href="concept.html">concept</a></li>
                         <li><a href="brands.html">brands</a></li>
                         <li><a href="philosophy.html">philosophy</a></li>
                         <li><a href="curation-process.html">curation process</a></li>
                         <li><a href="about.html">about us</a></li>
                         <li><a href="contact.html">contact</a></li> -->
                        </ul>
                    </div>
                </div>
            </nav>
        </div>
        <?php wp_head(); ?>
    </header>

这是我的网站供参考:https://www.thecurated.ch

0 个答案:

没有答案