Before we begin coding anything it’s important to understand the various resources made available to us by WordPress. In this lecture, I’m going to break down each resource provided by WordPress. You can follow along with me by checking out the links in the resource section on this lecture. If we were to search for WordPress you’ll come across two sites which are WordPress.com (dot com) and WordPress.org (dot org) thought even though they have similar domain names. You should be aware that there is a huge difference between the two. The dot com domain is a hosting platform for WordPress that is supported by a private company. I’ll talk more about that company in just a moment. Right off the bat, I want you to know something very important about WordPress hosting platforms. There are a lot of them out there but I do not recommend using these kinds of hosts as a developer. You’ll want to have full control over your WordPress sites. A lot of WordPress hosting platforms really limit what you can install and use while they’re user friendly. They’re not developer-friendly. Sometimes you’ll have a client asking one host to recommend for their site. In these instances try to recommend something which gives you the developer more flexibility as this course progresses. I’ll definitely talk more about hosting options and what you should be looking for in a host. All right.
Let’s keep moving forward. The dot .org domain is for anyone who wants to download the source code of WordPress and host it themselves. This is where we’ll be spending ninety-nine percent of our time throughout this course. Right away you’ll find a button to download WordPress. As of this course, we’ll be working with version 5 of WordPress download WordPress now as we’ll be installing it on our machines in a future lecture. Don’t worry if you see a higher version of WordPress all code we write will be compatible with future and past versions of WordPress. Throughout this course, you’ll find that features from versions as old as one point five is still supported and used.
Let’s explore this site a little more under its support. Click documentation here you’ll find information about WordPress and its features. You’ll notice that we’re in something called the codex. That’s just a fancy word WordPress uses to call its own documentation. Back in the early days, WordPress used the codex for everything from code examples to simple explanations about the user system. However, as WordPress grew the development team realized that mixing this information was not a good idea. So they took all the resources related to coding things and plugins into its own site in the URL bar changed the word codex to developer remove anything after that domain extension.
Here you’ll find resources strictly related to developers throughout this course we’ll be switching between the Codex and developer resources from time to time. You’ll find that the Codex resource contains code. This is because the WordPress team hasn’t fully transitioned all the code examples from the codex to the developer site. It’s currently a work in progress.
One of the great things about the site is that it is dynamically generated. The WordPress team has made it so that this site will scan all the code in WordPress to help generate the documentation. This way the site is always kept up to date. Let’s explore how to use this site very quickly. Right off the bat, you’ll be provided with links to four different sections a section for developing themes plugins and applications. This last section is actually new which provides information on how to use the WordPress CNY. We’ll be exploring all of these asked of course progresses all these sections are only guides if you want to look up a function or class then you need to scroll down and click the code reference link. You’ll be taken to a search page where you can look up functions hooks classes and methods. We haven’t gone over hooks so I don’t expect you to know what that is. Let’s ignore that for now. Right below this, you’ll find that WordPress documents all the latest code added to the word press corps. This is a really great way to check out what functions are added on the right. You’ll find all the API is available.
We’ll be exploring most of these throughout the course. Let’s take a look at how to search for code. I don’t expect you to follow along with you just need to understand that all this does is help you find more information about functions and other WordPress code by the end of this course you’ll be more than comfortable using this tool.
All right I’m going to search for something called the underscore content.
After submitting the search we should get about 10 results back.
I’m going to click on the first result.
WordPress will load this page that provides a lot of information on how you would go about using this function. There are a couple of things I want to highlight. The first is that you’ll always be provided with the original source code. Here you’ll find where WordPress defines this function. This is a really great way to understand how WordPress functions internally. A lot of this code may not make sense but I assure you that you’ll be able to read code like this and understand what it means by the end of this course.
Next is the changelogs section.
This will document when the function was first introduced and if there were ever any changes as you can see this function has been around since version 0 point 7 1. As I stated previously WordPress is a popular choice because most code you write will be compatible with earlier versions not as early as this but you shouldn’t have any problems with a few versions back down further. You’ll find a related uses section. Here you’ll find where a function is used within WordPress itself. This is a really great way to see how WordPress itself uses its own code. You’ll find some really great examples by reading through the WordPress code itself.
The last section is the user-contributed notes section. This section is available for anyone and everyone to submit some tips and tricks on how you would go about using this function. Something important I should highlight is that not all pages are like this. Some pages will provide even more information and others will provide very little for the most part through functions that are commonly used tend to be documented quite well. I know this is a lot of resources to take in but I promise you we will definitely be going over how to use both of these resources to your advantage. To reiterate the Codex is where you’ll find information on WordPress and all its features. The information presented here is user friendly the developer site provides information related to the code of WordPress. A lot of this information is technical and aimed at developers.
Before I finish things off let’s explore the site.
Automatic dot com automatic is a company that makes huge contributions to the WordPress software they own plugins such as jetpack and commerce. Even though they don’t own WordPress they do have a big influence over the open-source software. Automatic owns the dot com domain of WordPress but they do not own WordPress itself. It’s very important to make that distinction anyway that’s about it.