[英]Uncaught ReferenceError: wp is not defined in wordpress
i have edit or add new page
on wordpress ken theme
with WPBakery Visual Composer
but it not load properly我已使用
WPBakery Visual Composer
在wordpress ken theme
上edit or add new page
,但无法正确加载
its give error on console
它在
console
上给出错误
Uncaught ReferenceError: wp is not defined at mk_upload_option (admin-scripts.js:2)
未捕获的 ReferenceError: wp 未在 mk_upload_option (admin-scripts.js:2) 中定义
image for better understand图像以便更好地理解
i also done step like我也做了类似的步骤
but it did not work但它没有用
This could be the result of plugin conflicts, such as Autoptimize or Async Javascript.这可能是插件冲突的结果,例如 Autoptimize 或 Async Javascript。 I would first try to put the following in the "exclude" section of Autoptimuize and the issue might well go away.
我会首先尝试将以下内容放在 Autoptimuize 的“排除”部分,这个问题很可能会消失。 "wp-includes/js"
“wp-包括/js”
If the issue persists, I would place exclude the following in both plugins:如果问题仍然存在,我会在两个插件中排除以下内容:
wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js, js/jquery/jquery.min.js wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js, js/jquery/jquery.min.js
Try this.尝试这个。 It may helps.
它可能会有所帮助。 Use customizer's js file array dependency as 'customize-preview' while enqueuing.
在排队时使用定制器的 js 文件数组依赖项作为“customize-preview”。
wp_enqueue_script( 'customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '1.0', true );
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.