代码之家  ›  专栏  ›  技术社区  ›  FoamyMedia

如何修复页面一半以下的网页负载

  •  0
  • FoamyMedia  · 技术社区  · 7 年前

    https://jakke.co.uk/checkout/

    当篮子里有东西,你去结账时,它会把页面往下放一半,我不知道为什么。

    是一个有主题的woocommerce网站,已经尝试删除主题覆盖文件,但这种情况仍然存在。

    1 回复  |  直到 7 年前
        1
  •  2
  •   Pribhav    7 年前

    这是因为关注账单表单的“名字”字段。

    只需在下面的代码中添加主题函数。php文件。

    add_filter( 'woocommerce_checkout_fields' , 'custom_wc_checkout_fields' );

    函数custom\u wc\u checkout\u字段($fields){

    $fields['billing']['billing_first_name']['autofocus'] = false;
    
    $fields['shipping']['shipping_first_name']['autofocus'] = false;
    
    return $fields;
    

    }

    我希望它能帮助你。