Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在表单字段中单击后,搜索表单关闭_Php_Wordpress_Search Form - Fatal编程技术网

Php 在表单字段中单击后,搜索表单关闭

Php 在表单字段中单击后,搜索表单关闭,php,wordpress,search-form,Php,Wordpress,Search Form,亲爱的编程和PHP天才们 我是php新手,在我的Wordpress商店页面上创建了一个搜索表单(它还没有公开)。在搜索了几天错误之后,我仍然不知道错误可能在哪里。我安装了SublimiteText+SublimiteLiner来查找语法错误,但显然没有 当我尝试键入内容时(单击时),搜索表单将立即关闭 我使用“裁缝先生”主题: 因此,这里是代码(它相当长,我不确定这是否有帮助,所以如果我必须添加任何内容,请让我知道): 请注意: 新闻稿 你对unserem的时事通讯和möchten

亲爱的编程和PHP天才们

我是php新手,在我的Wordpress商店页面上创建了一个搜索表单(它还没有公开)。在搜索了几天错误之后,我仍然不知道错误可能在哪里。我安装了SublimiteText+SublimiteLiner来查找语法错误,但显然没有

当我尝试键入内容时(单击时),搜索表单将立即关闭

我使用“裁缝先生”主题:

因此,这里是代码(它相当长,我不确定这是否有帮助,所以如果我必须添加任何内容,请让我知道):





请注意:






新闻稿

你对unserem的时事通讯和möchten regelmßigüber neue Produkte感兴趣, Sondrangebote和Ander tolle Sachen告密者werden?您的注册号是多少 新闻稿

  • “alt=”“/>
    您正在引用事件目标id,但事件目标未设置id。如果检查代码,则搜索输入元素未设置id

    scripts.js(143):

    如果由于任何原因不能向该元素添加id,也可以按其名称搜索(我不建议这样做,id更好)


    您正在引用事件目标id,但事件目标未设置id。如果检查代码,则搜索输入元素未设置id

    scripts.js(143):

    如果由于任何原因不能向该元素添加id,也可以按其名称搜索(我不建议这样做,id更好)


    你能更详细地描述一下你所说的“表单关闭”是什么意思吗?它真的从页面上消失了吗?它提交了吗?最初只有放大镜图标。如果我点击该图标,表单字段和“搜索”字段“按钮出现。如果我在表单字段中单击,它会立即再次折叠并返回到放大镜的原始状态。这听起来不像是后端代码问题。这听起来像是一个前沿问题。你能提供一个链接到工作演示(你的网站,而不是WP模板)?或者在JSFIDLE上复制这个问题?因为该网站受密码保护,所以我宁愿尝试在FIDLE上复制它。我会让你知道它是否有效。到目前为止,非常感谢您抽出时间!嘿,我决定现在就发布这个网站。没有和提琴一起工作。下面是链接:您能更详细地描述一下“表单关闭”是什么意思吗?它真的从页面上消失了吗?它提交了吗?最初只有放大镜图标。如果我点击该图标,表单字段和“搜索”按钮就会出现。如果我在表单字段中单击,它会立即再次折叠并返回到放大镜的原始状态。这听起来不像是后端代码问题。这听起来像是一个前沿问题。你能提供一个链接到工作演示(你的网站,而不是WP模板)?或者在JSFIDLE上复制这个问题?因为该网站受密码保护,所以我宁愿尝试在FIDLE上复制它。我会让你知道它是否有效。到目前为止,非常感谢您抽出时间!嘿,我决定现在就发布这个网站。没有和提琴一起工作。这里是链接:ThxWow,就像一个魅力。我会在黑暗中走上好几年才发现这一点。非常感谢您的快速帮助!哇,很有魅力。我会在黑暗中走上好几年才发现这一点。非常感谢您的快速帮助!
    <?php global $woocommerce, $mr_tailor_theme_options; ?>
    
                        <footer id="site-footer" role="contentinfo">
    
    
    
    <div id="own_footer">
                <img src="../../image_assets/logo_footer.png" alt="Logo">
    
                <br><br><br>
                <p>Folgen Sie uns auf: </p>
    
                <a href="https://www.instagram.com/fuchsundfeder/" target="_blank"><img                 src="../../image_assets/instagram_footer.png" alt="Logo" > </a>
    
                <img src="../../image_assets/facebook_footer.png" alt="Logo" >
    
                <a href="https://de.pinterest.com/fuchsundfeder/" target="_blank"><img src="../../image_assets/pinterest_footer.png" alt="Logo" > </a>
    
    
                <br><br><br>
    
                </div>
    
    
    
                <br><br>
    
                <p id="newsletter_copy">
                    NEWSLETTER
                    <br><br>
    
                    Sie haben Interesse an unserem Newsletter und möchten regelmäßig über neue  Produkte, 
                    Sonderangebote und andere tolle Sachen informiert werden? Dann registrieren Sie sich für unseren                    
                    Newsletter.
                </p>
    
    
    
    
    
                        <div id="footer_eingabefeld"> 
                        <?php if ( is_active_sidebar( 'footer-widget-area' ) ) : ?>
    
                            <div class="trigger-footer-widget-area">
                                    <span class="trigger-footer-widget-icon"></span>
                                </div>
    
                            <div class="site-footer-widget-area">
                                <div class="row">
                                    <?php dynamic_sidebar( 'footer-widget-area' ); ?>
    
    
    
    
                                </div><!-- .row -->
                        </div><!-- .site-footer-widget-area -->
    
    
    
    
    
    <?php endif; ?>
    
    
    <div id="footer_links">
    
    
    <li><a href="http://fuchsundfeder.com/pages/about-us">Über Fuchs und Feder</a></li>
    <li><a href="http://fuchsundfeder.com/contact">Kontakt</a></li>
    <li><a href="http://fuchsundfeder.com/pages/faqs">FAQ</a></li>
    <li><a href="http://fuchsundfeder.com/impressum">Impressum</a></li>
    <li><a href="http://fuchsundfeder.com/mein-konto">Mein Konto</a></li>
    
    
    </div>             
    
    
    
    
    
    <div class="site-footer-copyright-area">
    
                                <div class="row">
                                    <div class="medium-4 columns">  
                                        <div class="payment_methods">
    
                                            <?php
                                            if ( (isset($mr_tailor_theme_options['credit_card_icons']['url'])) && (trim($mr_tailor_theme_options['credit_card_icons']['url']) != "" ) ) {
                                                if (is_ssl()) {
                                                    $credit_card_icons = str_replace("http://", "https://", $mr_tailor_theme_options['credit_card_icons']['url']);      
                                                } else {
                                                    $credit_card_icons = $mr_tailor_theme_options['credit_card_icons']['url'];
                                                }
                                            ?>
    
                                            <img src="<?php echo $credit_card_icons; ?>" alt="<?php _e( 'Payment methods', 'mr_tailor' )?>" />
    
                                            <?php } ?>  
    
                                        </div><!-- .payment_methods -->
                                    </div><!-- .large-4 .columns -->
    
                                    <div class="medium-8 columns">
                                        <div class="copyright_text">
                                            <?php if ( (isset($mr_tailor_theme_options['footer_copyright_text'])) && (trim($mr_tailor_theme_options['footer_copyright_text']) != "" ) ) { ?>
                                                <?php _e( $mr_tailor_theme_options['footer_copyright_text'], 'mr_tailor' ); ?>
                                            <?php } ?>
                                        </div><!-- .copyright_text -->  
                                    </div><!-- .large-8 .columns -->            
                                </div><!-- .row --> 
                            </div><!-- .site-footer-copyright-area -->
    
                        </footer>
    
    
                    </div><!-- #page -->
    
                </div><!-- /st-content -->
            </div><!-- /st-pusher -->
    
    
    
    
    
    
    
    
    
    
            <nav class="st-menu slide-from-left">
                <div class="nano">
                    <div class="nano-content">
                        <div id="mobiles-menu-offcanvas" class="offcanvas-left-content">
    
                            <nav id="mobile-main-navigation" class="mobile-navigation" role="navigation">
                            <?php 
                                wp_nav_menu(array(
                                    'theme_location'  => 'main-navigation',
                                    'fallback_cb'     => false,
                                    'container'       => false,
                                    'items_wrap'      => '<ul id="%1$s">%3$s</ul>',
                                ));
                            ?>
                            </nav>
    
                            <?php 
    
                            $theme_locations  = get_nav_menu_locations();
                            if (isset($theme_locations['top-bar-navigation'])) {
                                $menu_obj = get_term($theme_locations['top-bar-navigation'], 'nav_menu');
                            }
    
                            if ( (isset($menu_obj->count) && ($menu_obj->count > 0)) || (is_user_logged_in()) ) {
                            ?>
    
                                <nav id="mobile-top-bar-navigation" class="mobile-navigation" role="navigation">
                                <?php 
                                    wp_nav_menu(array(
                                        'theme_location'  => 'top-bar-navigation',
                                        'fallback_cb'     => false,
                                        'container'       => false,
                                        'items_wrap'      => '<ul id="%1$s">%3$s</ul>',
                                    ));
                                ?>
    
                                <?php if ( is_user_logged_in() ) { ?>
                                    <ul><li><a href="<?php echo get_site_url(); ?>/?<?php echo get_option('woocommerce_logout_endpoint'); ?>=true" class="logout_link"><?php _e('Logout', 'mr_tailor'); ?></a></li></ul>
                                <?php } ?>
                                </nav>
    
                            <?php } ?>
    
                            <div class="language-and-currency-offcanvas hide-for-large-up">
    
                                <?php if (function_exists('icl_get_languages')) { ?>
    
                                    <?php $additional_languages = icl_get_languages('skip_missing=N&orderby=KEY&order=DIR&link_empty_to=str'); ?>
    
                                    <select class="topbar-language-switcher">
                                        <option><?php echo ICL_LANGUAGE_NAME; ?></option>
                                        <?php
    
                                        if (count($additional_languages) > 1) {
                                            foreach($additional_languages as $additional_language){
                                              if(!$additional_language['active']) $langs[] = '<option value="'.$additional_language['url'].'">'.$additional_language['native_name'].'</option>';
                                            }
                                            echo join(', ', $langs);
                                        }
    
                                        ?>
                                    </select>
    
                                <?php } ?>
    
                                <?php if (class_exists('woocommerce_wpml')) { ?>
                                    <?php echo(do_shortcode('[currency_switcher]')); ?>
                                <?php } ?>
    
                            </div>
    
    
    
    
    
    
    
    
    
                            <div class="mobile-socials">
                                <div class="site-social-icons">
                                    <ul class="//animated //flipY">
                                        <?php if ( (isset($mr_tailor_theme_options['facebook_link'])) && (trim($mr_tailor_theme_options['facebook_link']) != "" ) ) { ?><li class="site-social-icons-facebook"><a target="_blank" href="<?php echo $mr_tailor_theme_options['facebook_link']; ?>"><i class="fa fa-facebook"></i><span>Facebook</span></a></li><?php } ?>
                                        <?php if ( (isset($mr_tailor_theme_options['twitter_link'])) && (trim($mr_tailor_theme_options['twitter_link']) != "" ) ) { ?><li class="site-social-icons-twitter"><a target="_blank" href="<?php echo $mr_tailor_theme_options['twitter_link']; ?>"><i class="fa fa-twitter"></i><span>Twitter</span></a></li><?php } ?>
                                        <?php if ( (isset($mr_tailor_theme_options['pinterest_link'])) && (trim($mr_tailor_theme_options['pinterest_link']) != "" ) ) { ?><li class="site-social-icons-pinterest"><a target="_blank" href="<?php echo $mr_tailor_theme_options['pinterest_link']; ?>"><i class="fa fa-pinterest"></i><span>Pinterest</span></a></li><?php } ?>
                                        <?php if ( (isset($mr_tailor_theme_options['linkedin_link'])) && (trim($mr_tailor_theme_options['linkedin_link']) != "" ) ) { ?><li class="site-social-icons-linkedin"><a target="_blank" href="<?php echo $mr_tailor_theme_options['linkedin_link']; ?>"><i class="fa fa-linkedin"></i><span>LinkedIn</span></a></li><?php } ?>
                                        <?php if ( (isset($mr_tailor_theme_options['googleplus_link'])) && (trim($mr_tailor_theme_options['googleplus_link']) != "" ) ) { ?><li class="site-social-icons-googleplus"><a target="_blank" href="<?php echo $mr_tailor_theme_options['googleplus_link']; ?>"><i class="fa fa-google-plus"></i><span>Google+</span></a></li><?php } ?>
                                        <?php if ( (isset($mr_tailor_theme_options['rss_link'])) && (trim($mr_tailor_theme_options['rss_link']) != "" ) ) { ?><li class="site-social-icons-rss"><a target="_blank" href="<?php echo $mr_tailor_theme_options['rss_link']; ?>"><i class="fa fa-rss"></i><span>RSS</span></a></li><?php } ?>
                                        <?php if ( (isset($mr_tailor_theme_options['tumblr_link'])) && (trim($mr_tailor_theme_options['tumblr_link']) != "" ) ) { ?><li class="site-social-icons-tumblr"><a target="_blank" href="<?php echo $mr_tailor_theme_options['tumblr_link']; ?>"><i class="fa fa-tumblr"></i><span>Tumblr</span></a></li><?php } ?>
                                        <?php if ( (isset($mr_tailor_theme_options['instagram_link'])) && (trim($mr_tailor_theme_options['instagram_link']) != "" ) ) { ?><li class="site-social-icons-instagram"><a target="_blank" href="<?php echo $mr_tailor_theme_options['instagram_link']; ?>"><i class="fa fa-instagram"></i><span>Instagram</span></a></li><?php } ?>
                                        <?php if ( (isset($mr_tailor_theme_options['youtube_link'])) && (trim($mr_tailor_theme_options['youtube_link']) != "" ) ) { ?><li class="site-social-icons-youtube"><a target="_blank" href="<?php echo $mr_tailor_theme_options['youtube_link']; ?>"><i class="fa fa-youtube-play"></i><span>Youtube</span></a></li><?php } ?>
                                        <?php if ( (isset($mr_tailor_theme_options['vimeo_link'])) && (trim($mr_tailor_theme_options['vimeo_link']) != "" ) ) { ?><li class="site-social-icons-vimeo"><a target="_blank" href="<?php echo $mr_tailor_theme_options['vimeo_link']; ?>"><i class="fa fa-vimeo-square"></i><span>Vimeo</span></a></li><?php } ?>
                                    </ul>
                                </div>
                            </div>
    
                        </div>
                        <div id="filters-offcanvas" class="offcanvas-left-content wpb_widgetised_column">
                            <?php if ( is_active_sidebar( 'catalog-widget-area' ) ) : ?>
                                <?php dynamic_sidebar( 'catalog-widget-area' ); ?>
                            <?php endif; ?>
                        </div>
                    </div>
                </div>
            </nav>
    
            <nav class="st-menu slide-from-right">
                <div class="nano">
                    <div class="nano-content">
                        <div id="minicart-offcanvas" class="offcanvas-right-content"><?php if ( class_exists( 'WC_Widget_Cart' ) ) { the_widget( 'mr_tailor_WC_Widget_Cart' ); } ?></div>
                        <div id="wishlist-offcanvas" class="offcanvas-right-content"><div class="widget"></div></div>
                    </div>
                </div>
            </nav>
    
    
    
    
        </div><!-- /st-container -->
    
        <!-- ******************************************************************** -->
        <!-- * Custom Footer JavaScript Code ************************************ -->
        <!-- ******************************************************************** -->
    
        <?php if ( (isset($mr_tailor_theme_options['footer_js'])) && ($mr_tailor_theme_options['footer_js'] != "") ) : ?>
            <script type="text/javascript">
                <?php echo $mr_tailor_theme_options['footer_js']; ?>
            </script>
        <?php endif; ?>
    
        <?php if ( (isset($mr_tailor_theme_options['sticky_header'])) && (trim($mr_tailor_theme_options['sticky_header']) == "1" ) ) : ?>
    
    
        <!-- ******************************************************************** -->
        <!-- * Sticky Header **************************************************** -->
        <!-- ******************************************************************** -->
    
        <div class="site-header-sticky">
            <div class="row">       
            <div class="large-12 columns">
                <div class="site-header-sticky-inner">
                    <div class="site-branding">
    
                        <?php
                        if ( (isset($mr_tailor_theme_options['site_logo']['url'])) && (trim($mr_tailor_theme_options['site_logo']['url']) != "" ) ) {
                            if (is_ssl()) {
                                $site_logo = str_replace("http://", "https://", $mr_tailor_theme_options['site_logo']['url']);      
                            } else {
                                $site_logo = $mr_tailor_theme_options['site_logo']['url'];
                            }
                        ?>
    
    
    
                            <a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><img class="site-logo" src="<?php echo $site_logo; ?>" title="<?php bloginfo( 'description' ); ?>" alt="<?php bloginfo( 'name' ); ?>" /></a>
    
                        <?php } else { ?>
    
                            <div class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></div>
    
                        <?php } ?>
    
                    </div><!-- .site-branding -->
    
                    <?php
                    if ( (isset($mr_tailor_theme_options['site_logo_retina']['url'])) && (trim($mr_tailor_theme_options['site_logo_retina']['url']) != "" ) ) {
                    ?>
                    <script>
                    //<![CDATA[
    
                        // Set pixelRatio to 1 if the browser doesn't offer it up.
                        var pixelRatio = !!window.devicePixelRatio ? window.devicePixelRatio : 1;
    
                        logo_image = new Image();
    
                        jQuery(window).load(function(){
    
                            if (pixelRatio > 1) {
                                jQuery('.site-logo').each(function() {
    
                                    var logo_image_width = jQuery(this).width();
                                    var logo_image_height = jQuery(this).height();
    
                                    jQuery(this).css("width", logo_image_width);
                                    jQuery(this).css("height", logo_image_height);
    
                                    jQuery(this).attr('src', '<?php echo $mr_tailor_theme_options['site_logo_retina']['url'] ?>');
                                });
                            };
    
                        });
    
                    //]]>
                    </script>
                    <?php } ?>
    
                    <div id="site-menu">
    
                        <nav id="site-navigation" class="main-navigation" role="navigation">                    
                            <?php 
                                wp_nav_menu(array(
                                    'theme_location'  => 'main-navigation',
                                    'fallback_cb'     => false,
                                    'container'       => false,
                                    'items_wrap'      => '<ul id="%1$s">%3$s</ul>',
                                ));
                            ?>           
                        </nav><!-- #site-navigation -->                  
    
                        <div class="site-tools">
                            <ul>
    
                                <li class="mobile-menu-button"><a><i class="getbowtied-icon-menu"></i></a></li>
    
                                <?php if (class_exists('YITH_WCWL')) : ?>
                                <?php if ( (isset($mr_tailor_theme_options['main_header_wishlist'])) && (trim($mr_tailor_theme_options['main_header_wishlist']) == "1" ) ) : ?>
                                <li class="wishlist-button"><a><i class="getbowtied-icon-heart"></i></a><span class="wishlist_items_number"><?php echo yith_wcwl_count_products(); ?></span></li>                           
                                <?php endif; ?>
                                <?php endif; ?>
    
    
    
                                <?php if (class_exists('WooCommerce')) : ?>
                                <?php if ( (isset($mr_tailor_theme_options['main_header_shopping_bag'])) && (trim($mr_tailor_theme_options['main_header_shopping_bag']) == "1" ) ) : ?>
                                <?php if ( (isset($mr_tailor_theme_options['catalog_mode'])) && ($mr_tailor_theme_options['catalog_mode'] == 1) ) : ?>
                                <?php else : ?>
                                <li class="shopping-bag-button" class="right-off-canvas-toggle"><a><i class="getbowtied-icon-shop"></i></a><span class="shopping_bag_items_number"><?php echo $woocommerce->cart->cart_contents_count; ?></span></li>
                                <?php endif; ?>
                                <?php endif; ?>
                                <?php endif; ?>
    
                                <?php if ( (isset($mr_tailor_theme_options['main_header_search_bar'])) && (trim($mr_tailor_theme_options['main_header_search_bar']) == "1" ) ) : ?>
                                <li class="search-button"><a><i class="getbowtied-icon-search"></i></a></li>
                                <?php endif; ?>
    
                            </ul>   
                        </div>
    
                        <div class="site-search">
                            <?php
                            if (class_exists('WooCommerce')) {
                                the_widget( 'WC_Widget_Product_Search', 'title=' );
                            } else {
                                the_widget( 'WP_Widget_Search', 'title=' );
                            }
                            ?>             
                        </div><!-- .site-search -->
    
    
                    </div><!-- #site-menu -->
    
                    <div class="clearfix"></div>
                </div><!--.site-header-sticky-inner-->  
            </div><!-- .large-12-->
            </div><!--.row--> 
        </div><!-- .site-header-sticky -->
    
        <?php endif; ?>
    
    
    
        <!-- ******************************************************************** -->
        <!-- * WP Footer() ****************************************************** -->
        <!-- ******************************************************************** -->
    
        <div class="login_header">
            <a class="go_home" href="<?php echo home_url(); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>
        </div>
    
    
    <?php wp_footer(); ?>
    
    </body>
    
    </html>
    
    $("body").on('click',function(e) {
        if($(e.target).attr('class') == 'getbowtied-icon-search' 
           || $(e.target).attr('id') == 's') {
                return;
        } else {
            reset_search_toggles()
            $('body').unbind('click');
        }
    });
    
    if($(e.target).attr('class') == 'getbowtied-icon-search' 
        || $(e.target).attr('id') == 's'
        || $(e.target).attr('name') == 's') {