Part of the reason for the success of WordPress is how easy it is to customize with themes and plugins. There are a huge number of plugins available in the WordPress Plugin Directory or on Envato Market, but if you want to take your WordPress skills to the next level, there's no substitute for learning to code custom plugins.
In this course, you'll learn about how plugins work and how you can create different kinds of plugin. This is a comprehensive guide to everything you need to know to write your own plugins! You'll start with the basics—how to create a new plugin, how to structure your code, and how to connect to the plugin's API. Next, you'll learn some of the fundamentals of plugin development, like including scripts and styles. Finally, you'll learn the building blocks of creating WordPress plugins: custom content types and taxonomies, adding settings to the admin page, outputting HTML content, and creating widgets and shortcodes.
Do you want to learn WordPress development from start to finish? Check out our learning guide: Learn WordPress Development.
1.Introduction2 lessons, 04:10
2.Plugin Overview3 lessons, 25:08
3.Writing a Plugin3 lessons, 17:22
4.Plugin Functionality4 lessons, 31:26
5.Conclusion1 lesson, 02:41
Hello and welcome to this Tuts+ course on WordPress plugin development. In this course, I'm gonna teach you the basics for plugin development and you'll get a good grounding in all the different aspects of plugin development and what you need to know to write your own plugins. So we'll start by identifying when you should write a plugin instead of using the functions file, and what the purpose of a plugin is. We'll then look at the structure of a plugin and I'll use a big complex plugin like Woo Commerce to demonstrate how you should organize your own plugins. We'll then move on to some practical examples of plugin code. So I'll show you how to set up a plugin and how to do things like in queuing style sheets and adding include files. And then I'll show you some specific examples of how to write plugins to create things like widgets and short codes and to query the database. We'll also look at how to use a plugin to customize the admin screens. Watch this course and get a thorough grounding in how to write your own plugin.
1.2 How This Course Works
Hello, and welcome back to this Tuts+ course on WordPress plugin development. This course works slightly differently from many of the other courses you might have seen on the Envato Tuts+ website. So in this part of the course, I'm gonna show you how the course will work and give you an idea of what to expect. Because I want to give you a broad grounding in all the aspects of plugin development, I'm not going to develop just one plugin during this course. Instead, I'll refer to a number of plugins that are available via Tuts+ and that you'll see in other courses. So the code will apply to various parts of the course. And you can see that this is a long course with lots of code. So for example, in the next part, Part 3.1, I'm gonna show you the code from a plugin to register taxonomies. And I'm also going to show you a theme. Because, that way, I'll demonstrate the difference between using your functions file and using a plugin. And as we work through the course, you'll see examples of code and plugins. So for example, we'll look at WooCommerce, which is a big third-party theme, and I'll use that to demonstrate how to structure your own plugins. In parts 4.1 to 4.4, we'll get a little bit more hands-on. And you'll start coding your own sample plugin if you work along with me. So what we'll end up with is a sample plugin that has some structure, with some includes, some scripts, and some styles, and has this core file. In which, I'll show you how to enqueue scripts and styles and how to include your files. And I'll also show you how to set up your plugin and add this commented out text. So that you know exactly how to start writing your first plugin. We'll then move on to some more examples where we'll be looking at existing courses and the code for them. So for example here, we'll look at this section-menus plugin. And I'll use that to demonstrate how you output content using the results of a query. So instead of creating one long plugin as we go along, we'll be creating one small plugin to show you the basics of plugin development. But I'll also use lots of existing plugins. And I'll work through the code of those in detail with you to demonstrate how they do what they do, and how you can achieve different functionality with your plugins. And as we go along, I'll show you the courses that they relate to, and I'll give you a link to them as well. I'll also refer you to a demo site that I'll be using in some parts of the course. And we'll look at the WordPress codex in various places. And I'll give you links to the relevant codex places for the different aspects of the course. So when you finish this course, instead of understanding in depth how to code one type of plugin, you'll have a broad grounding in how plugins work. And how you can use plugins to achieve different things in WordPress. And you can then take that knowledge to go on and learn how to code specific plugins in WordPress using our courses. In the next part of the course, I'll start looking at how you would use a plugin. And I'll compare the use of a functions file in the theme to coding a plugin. See you next time and thanks for watching.