Enqueueing Scripts and Styles

WordPress relies on several programming languages to provide a solid, yet extensible, framework to build upon. The server-side language PHP does the heavy lifting behind the scenes to provide data to the browser. The browser employs client-side languages like HTML, CSS, JavaScript and jQuery to produce a rich and seemingly limitless user experience. At its core, WordPress already manages a long list of scripts and styles to produce a functioning web page. Many scripts and styles are included in WordPress core; others are added by plugins or themes. WordPress has built-in systems to keep track of all the scripts and styles, keep them from conflicting with each other, and use them in the correct order. In this talk you will learn how to tap into the system WordPress uses to manage the myriad scripts, and correctly load the scripts and styles you need so that WordPress can manage them efficiently. The method for adding scripts and styles to WordPress is essentially the same for both plugins and themes. In this talk, we will be customizing a child theme, but what you will learn is also applicable to building plugins. The proper way to add scripts and styles to your theme is to enqueue them in the functions.php file. The details of how to do this depend on several things, including whether you are enqueueing scripts or styles, and whether they will be used on front-end pages, admin pages, or login pages.

Speaker