WordPress Developer Tips: Enqueuing Styles and Scripts

with Morten Rand-Hendriksen
please wait ...
WordPress Developer Tips: Enqueuing Styles and Scripts
Video duration: 0s 38m 31s Advanced

Viewers:

There's a right way and a wrong way to add style sheets and JavaScript libraries and scripts to your WordPress themes. The right way takes advantage of the WordPress enqueue system, which prevents script and style conflicts. In this installment of WordPress Developer Tips, staff author Morten Rand-Hendriksen introduces the two main functions for enqueuing: wp_enqueue_style() and wp_enqueue_script(0). He'll show how the functions work and how to adjust their parameters, as well as theoretical and practical examples of implementing them in themes. This course uses Simone, a theme developed especially for Morten's WordPress: Building Themes from Scratch Using Underscores course, but you can use any theme or subtheme that you'd like.

Subject:
Web
Software:
WordPress
Author:

Welcome

- [Voiceover] Hi, I'm Morten Rand-Hendriksen, staff author at lynda.com, and I would like to welcome you to WordPress Developer Tips: Enqueuing Styles and Scripts. In this course I'll show you how to add style sheets JavaScript libraries and custom JavaScripts to your WordPress themes the right way by enqueuing them. We'll focus on the two main functions for enqueuing content wp_enueue_style, and wp_enqueue_script, and I'll show you how each of these functions work, what their parameters are and how you can apply them to your theme right now.

This is a theoretical course that provides best practice techniques. Through the course I'll provide you with both theoretical and practical examples of how to implement style sheets and scripts in an actual theme. I'll be using the Simone theme that was developed in the WordPress Developing Themes from Scratch with Underscores course from the lynda.com library and you can follow along using either Simone or any other theme or trial theme of your choice. The ability to conditionally enqueue style sheets and scripts in your theme is one of the features that makes WordPress as powerful as it is, and I'm excited to show you how to do it right, so let's get cracking with WordPress Developer Tips, Enqueuing Styles and Scripts.

please wait ...