enqueue script won’t work (enqueue style does work)
You’re using the wrong hook. wp_enqueue_scripts is the correct hook for both: add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ ); add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_scripts’ ); But since they’re the same hook you can just enqueue both files in the same callback: function my_theme_enqueue_assets() { wp_enqueue_style( ‘parent-style’, get_parent_theme_file_uri( ‘style.css’ ) ); wp_enqueue_script( ‘behavior’, get_theme_file_uri( ‘behavior.js’ ), array(), null, true ); } … Read more