【问题标题】:Wordpress - slider not working after updateWordpress - 更新后滑块不起作用
【发布时间】:2016-06-17 03:10:17
【问题描述】:

这是分配给我的网站,你能帮我修复滑块吗?我不知道是什么导致了错误。

http://www.kentcnc.com/

【问题讨论】:

    标签: wordpress slider


    【解决方案1】:

    你的 jquery 路径错误,修复它。检查wp_enqueue_script可能是那里的路径不对,找到合适的目录改一下。

    您也可以在 header.php 文件中搜索它,这就是您的头部外观:

    <head>
    <script src="jquery-1.12.2.min.js"></script> <!--this line is wrong!-->
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9,chrome=1">
        <meta name="viewport" content="width=device-width,initial-scale=1">
        <link href='http://fonts.googleapis.com/css?family=Cabin:400,500,400italic,600,700|Sanchez' rel='stylesheet' type='text/css'>
        <title>Kent CNC - CNC Machining Centers and Turning Centers</title>
    

    我不认为 wp_enqueue_script 被用来设置它。找到它的位置并设置正确的路径。

    【讨论】:

    • 谢谢,我试试。
    • 查看您的functions.php 文件,如果它不存在,检查header.php、head.php 或任何custom.php。如果找不到,请通过命令行使用 egrep -R "jquery-1.12.2.min.js" 在 /wp-content/themes/yourtheme 文件夹中登录应用程序。 egrep -R 命令也可用于在您的 wordpress 目录中查找 jquery 文件。不客气,不介意再问,以防万一你没有找到它。
    • 我尝试为 jquery 1.12.2 使用 cdn,但仍然没有运气。我认为这是控制台中的 msie 属性,但我不知道应该修改什么。
    • 您知道 jquery 1.12.2 在您的服务器中的位置吗?我的意思是,它是目录路径。
    • 遗憾的是,他们只是给了我 wordpress 访问权限。这是我唯一的东西。当我使用cdn时,jquery 1.12.2 404错误已经消失了
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-06
    • 1970-01-01
    • 1970-01-01
    • 2022-09-23
    • 2020-06-19
    • 2015-11-14
    相关资源
    最近更新 更多