How JS Files and CSS Files are loaded in WordPress

In examples shown below only js files are considered but concepts (along with hook names) remain same for stylesheets too. FRONTEND: Scripts and Styles should be enqueued using wp_enqueue_script() & wp_enqueue_style() functions. You can call those functions anywhere you want but ideally they should be called on wp_enqueue_scripts hook. function myslug_enqueue_style() { wp_enqueue_style( 'some-css',<url-of-css-file>, false …

How JS Files and CSS Files are loaded in WordPress Read More »