Introduction to Plugin Development: Wordpress Tutorial

A free video tutorial from Zac Gordon
Expert Educator
Rating: 4.0 out of 5Instructor rating
4 courses
23,392 students
Introduction to Plugin Development

Learn more from the full course

Complete WordPress Theme & Plugin Development Course

Everything you need to become a hirable WordPress Developer building custom themes and plugins

16:04:39 of on-demand video • Updated January 2020

PHP for WordPress - The Loop, Conditionals, Hooks and More!
How to Work with Child and Starter Themes Like Pro
The Ins and Outs of the Template Hierarchy - Always Know What File to Customize
How To Enqueue and Work with JavaScript and CSS in Themes
The Complete List of Template Tags To Use When Customizing and Extending Themes
A Deep Understanding of How to Use Action and Filter Hooks to Programmatically Control WordPress
A Solid Starter Template For Building Your Own WordPress Plugins
Common Practices and Techniques for Building Custom WordPress Plugins
English [Auto]
Welcome. In this section, we're going to transition from looking at the theme side of WordPress development and start focusing on building plugins. The first thing we have to do is review that a theme determines how a site looks, whereas a plugin extends WordPress functionality. So this raises the question of should code go in a functions.php file inside of a theme or should it go in its own plugin? Now what you'll find is a lot of the code that we write for plugins could also be executed within a theme's functions.php file. Ideally, the thing you want to think about is this functionality something that you would want to keep on the site if someone changed themes. So if someone were to change themes, they would lose all functionality inside of the Functions.php file. If this is not something you want to happen, then you want to take that functionality, pull it out and put it into a plugin. However, if this is functionality that will only ever work with this specific theme, then it may make sense to include it in the functions.php until you start getting too much code, at which point it may make sense to architect it as a plugin instead. Of course, sometimes it's perfectly clear when you need to write a plugin versus a theme. However, we will start our exploration of building themes with some familiar code that you may find in a Functions.php file. Then we'll dive deeper into more plugin specific concepts and code from there. So let's start off with looking at the basic files and code. We need to start building a WordPress plugin.