![]() That should be pretty much all the information you’d need to have to start using wp_enqueue_script() function. Wp_enqueue_style( 'wpa-main-css', get_theme_file_uri( 'dist/styles/main.css' ),, filemtime( get_theme_file_path( 'dist/styles/main.css' ) ) ) There’s actually almost identical function to wp_enqueue_script() called wp_enqueue_style() that allows you to enqueue css files. Wp_enqueue_script( 'wpa-main-js', get_theme_file_uri( 'dist/scripts/main.js' ),, filemtime( get_theme_file_path( 'dist/scripts/main.js' ) ), true ) Īdd_action( 'wp_enqueue_scripts', 'wpa_enqueue_scripts', 100 ) Use wp_enqueue_style() for css files Luckily it’s pretty easy to bust a cache with the timestamp of the js file:
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |