![]() False means header and true means footer. The last parameter decides if the JavaScript file should be enqueued in wp_head() or in wp_footer(). Wp_enqueue_script( 'second', get_theme_file_uri( 'dist/scripts/main.js' ),, null, true ) Īdd_action( 'wp_enqueue_scripts', 'wpa_enqueue_scripts', 100 ) Wp_enqueue_script( 'first', get_theme_file_uri( 'dist/scripts/first.js' ),, null, true ) Or you can enqueue a file with a handle 'first' and then use it as a dependency for your second file called 'second' like this:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |