Php wordpress将一些脚本排成队列并保留其他脚本

Php wordpress将一些脚本排成队列并保留其他脚本,php,wordpress,Php,Wordpress,我正在使用下面的函数在function.php文件中注册脚本并将其排队。问题是只有一个脚本(custom.js)似乎没有排队……当我在这里查看页面的源代码时:custom.js没有加载。有什么想法吗 function register_my_scripts() { wp_register_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ),null, true

我正在使用下面的函数在function.php文件中注册脚本并将其排队。问题是只有一个脚本(custom.js)似乎没有排队……当我在这里查看页面的源代码时:custom.js没有加载。有什么想法吗

function register_my_scripts() { 
wp_register_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ),null, true );
wp_register_script( 'nicescroll', get_template_directory_uri() . '/js/jquery.nicescroll.min.js', array( 'jquery' ),null, true );
wp_register_script( 'custom', get_template_directory_uri() . '/js/custom.js', array( 'jquery','nicescroll' ),null, true );
wp_enqueue_script('jquery'); 
wp_enqueue_script( 'bootstrap' ); 
wp_enqueue_script( 'nicescroll' );
wp_enqueue_style( 'custom' ); 
 }

add_action( 'wp_enqueue_scripts', 'register_my_scripts' ); 
简单地改变

wp_enqueue_style( 'custom' ); 


有时候它就在你面前。谢谢:)
wp_enqueue_script( 'custom' );