Check out a free preview of the full JavaScript for WordPress course:
The "Course Agenda" Lesson is part of the full, JavaScript for WordPress course featured in this preview video. Here's what you'd learn in this lesson:

Zac reviews the JavaScript for WordPress course agenda.

Get Unlimited Access Now

Transcript from the "Course Agenda" Lesson

[00:00:00]
>> Zac: That's just a little general outline about introduction to JavaScript in WordPress. Now, we don't have time today to get into how to work with every core feature. So, what we are gonna talk about first is the process of what WordPress calls enqueuing. So, this is basically getting your JavaScript into a theme and you don't just put it in your footer and hard code it.

[00:00:19] You have to actually load it through some PHP code. So, we're gonna walk through the different ways that you could do that, some of the tricks around it, some of the different things that you may or may not know about with that. And then, of course, we'll shift from there to talk about plugins.

[00:00:31] It's pretty much the same process but it's just enough difference that it is important to mention and of course, when you have a plugin, you can run JavaScript anywhere in the admin area. So if you wanna plugin that hijacks the edit pages, and loads your own custom JavaScript, you could do that.

[00:00:48] Now in both of these examples, I'm not, we don't have time today to teach JavaScript. So, I'm going to give you code examples that are already fully coded with the JavaScript, and there'll just be some core things missing or wrong with them. And you'll have to go in do that.

[00:01:03] And I pick things that or you mostly likely to have to copy paste and change next time, right? So if you have one project and then you're, I need to that again you're gonna have to copy this block of code. You are gonna have to put it here change this three things and then you can write the rest of it.

[00:01:16] So all the examples today are really built around that. And I hope that, that's helpful. I will say, depending on your JavaScript level, the examples do get more complex as we go on, so you may end up getting to a point where you're, I don't know what is happening, but it's working.

[00:01:31] And that's awesome, and you could take these and play around with them. And I hope that if you have projects that explore this more, that you'll be able to use those as kind of jumping off points. Then we gotta talk briefly about AJAX. We're shifting away from relying so heavy on AJAX in WordPress and we're moving more to, I guess you could still say it's AJAX.

[00:01:51] But API driven AJAX, instead of custom PHP functions that you're writing and are returning a certain request. But it's a little funky, so we do have to look at it. So we'll look at how to do that in WordPress. And that's gonna be kind of where we break, so this is what I'd call the more traditional WordPress JavaScript.

[00:02:12] And then we'll shift in the afternoon into getting into the WordPress API driven stuff and that's kind of a more modern take on it. So from there, excuse me, we'll look at all of the different end points and what comes up out of the box what you may expect to see customized.

[00:02:28] And then we'll go back to our themes and plugins and we'll say okay if we're in a theme or a plugin how can we pull an API and use it just piecemeal or completely. And then if we're decoupled from WordPress so if we're launching on a completely different server somewhere else nowhere connected to WordPress, how do we pull in posts?

[00:02:46] How do we pull in pages? How do we authenticate and save data and stuff like that. So these last two projects, what we'll be building is something that will list all of our posts in JavaScript, give us a single page view of them and also allow us to log in and add posts, edit posts and delete them.

[00:03:04] So we're not rebuilding everything. You're not gonna be able to edit categories around featured images and things like that but from this foundation it should be a pretty good jumping off point, especially if you have some comfort with API's.