admin管理员组文章数量:1418041
I've got a really simple enqueue in my functions.php
file. The weird thing is that it only actually inserts the script if I'm logged in. I've tried wiping out everything else in the functions.php
but it doesn't change anything. I'm not even sure what to try next. Any ideas?
function enqueue_my_script() {
wp_enqueue_script( 'my-script', get_stylesheet_directory_uri() . '/my-script.js');
}
add_action( 'wp_enqueue_scripts', 'enqueue_my_script' );
本文标签: functionsWhy does my wpenqueuescript() only insert the script for logged in users
版权声明:本文标题:functions - Why does my wp_enqueue_script() only insert the script for logged in users 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745277417a2651264.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论