[英]Must I register a script before using wp_enqueue_script() in WordPress
[英]In wordpress, why I should register and enqueue js scripts with wp_register_script() and wp_enqueue_script()?
为什么不在HTML内容中添加我需要的脚本?
为什么这里有几个原因!
if(is_page()|| is_single()){wp_enqueue_script(......); }
因为插件也需要一种添加脚本的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.