functions - Why does my wp_enqueue_script() only insert the script for logged in users

I've got a really simple enqueue in my functions.php file. The weird thing is that it only actually inserts the scr

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' );

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745277417a4620119.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信