我对Wordpress相对较新。
我有两个Wordpress实例-一个在prod的服务器上运行, 另一个在我从服务器下载的完全相同的副本上运行, 但在本地运行。
我要解决的问题是-服务器上的一个正在主题内加载所有必需的JS文件。但是, 我的本地运行实例仅加载主题之外的JS文件。
另外, 我在本地运行的实例中注意到-在<html>标记中添加了一个no-js类, 而prod实例中却没有此类。这使我相信主题本身或在wordpress管理面板中启用或禁用JS的某处必须进行某种切换。
在某些情况下, 我使用的是最小主题:https://wordpress.org/themes/minimum-minimal/
#1
我发现阻止JS加载的原因-我忘了包含<?php wp_footer();。在页脚中添加?>-加载所有剩余的必要JS, 特别是如果它们是通过wp_enqueue_script通过in_footer arg设置为true导入的
来源:
https://www.srcmini02.com/66109.html
微信公众号
手机浏览(小程序)
Warning: get_headers(): SSL operation failed with code 1. OpenSSL Error messages:
error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(): Failed to enable crypto in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57
Warning: get_headers(https://static.shanhubei.com/qrcode/qrcode_viewid_40637.jpg): failed to open stream: operation failed in
/mydata/web/wwwshanhubei/web/wp-content/themes/shanhuke/single.php on line
57