PHP for WordPress
2h 25mIntermediate2025-01-10
Authors

Joe Casabona
Course Developer, Founder of Creator Courses
Course details
Looking to add custom functionality to your WordPress site? In this course, learn what every WordPress developer needs to know to start coding in PHP. Instructor Joe Casabona helps you quickly get up to speed with the popular server-side programming language, explaining just what you need to know to start adding your own custom code. After briefly going over what PHP is, Joe introduces key concepts. Learn about decision-making with conditional statements, creating custom functions, the block and site editor, and how WordPress handles most variables. Along the way, Joe provides challenges that allow you to put your new skills to the test. By the end of this course, you'll be equipped with a basic understanding of PHP and how to use it to make simple modifications in WordPress.
Skills covered
PHPWordPressContent Management Systems (CMS)Back-End Web DevelopmentWeb Development ToolsWeb DevelopmentProgramming LanguagesOpen SourceSoftware DevelopmentOne-Off
Concepts
Introduction
- What is PHP for WordPress
- What you should know
- Setting up a local environment
PHP Basics
- What is PHP
- Printing information
- What are variables
- Strings in PHP
- Using arrays
- Arithmetic operators and math in PHP
- Challenge - Perform mathematical operations and store it
- Solution - Perform mathematical operations and store it
Control Structures
- Comparison operators and the truth
- Logical operators
- Creating if else statements
- Switch and match statements
- Conditional tags in WordPress
- Loops
- The Loop in WordPress
- Challenge - Loop through an array of information
- Solution - Loop through an array of information
Using Functions
- What are functions
- Using functions in WordPress
- Helpful PHP functions
- Writing your own functions
- Challenge - Write your own function to compare two numbers
- Solution - Write your own function to compare two numbers
Working in WordPress
- The functions file
- Copying Hello Dolly
- WP Query
- Hooks, actions, and filters
- PHP in the Block Editor
- Theme development in the age of the Block Editor
- Creating a plugin
- Is PHP enough
Conclusion
- Next steps