Welcome to our free course on object-oriented PHP (OOPHP) for WordPress. This course explains the following:
- The object-oriented paradigm in software development, and its strengths and weaknesses relative to other paradigms,
- The core concepts of object-oriented programming in PHP with code examples,
- A few advanced topics in OOPHP that are especially useful in WordPress development, and
- How object-oriented code can best fit into the broader WordPress software system.
After the main course content, we link you to our courses on the two most important object-oriented systems in WordPress: WP_Query
and the Widgets API.
Before we dive in, an invitation. If you want to better understand modern WordPress development, have a look at our full “learn WordPress development” course, Modern WordPress Fast Track. It’s the best current guide to WordPress development out there.
Master Modern WordPress Development 🏆
Get ‘Modern WordPress Fast Track’ today
Become a WordPress Developer Who Can Build Anything
Learn to build high-value block themes and plugins with AI and automation in a focused 10-week course. By the end, you’ll master block themes and plugins, leverage AI assistance, implement automated testing, optimize for scale, and confidently deploy professional WordPress solutions.
Presale is currently open with 40% OFF until May 23rd, 2025. 🚀
Course starts June 1st.
We have prepared special bonuses for everyone who enrolls during this period! 🎁
Enjoy this free course on OOPHP!
1. Object-Oriented Programming as a Software Paradigm
What is object-oriented programming at a conceptual level? Why is it better (or worse) than its alternatives? Start here for a comparison of OOP with both procedural and functional programming.
The Three Development Paradigms: Procedural, Object-Oriented, and Functional
2. Introduction to Object-Oriented PHP
Object-oriented programming revolves around two fundamental concepts: classes and objects. Learn what those concepts mean and how they interact, with code examples, in this core introduction to OOPHP.
Introduction to Object-Oriented PHP for WordPress Developers
3. Understanding Class Inheritance in PHP
Class inheritance (child and parent classes) is a core feature of object-oriented programming. Learn how class inheritance functions in OOPHP, with clear code examples.
Understanding Class Inheritance (Child and Parent Classes) in Object-Oriented PHP
4. The __construct()
Magic Method
In OOPHP, a class’s __construct()
method will run anytime an object of that class is instantiated. Learn how __construct()
works and what it’s good for.
5. How to Combine Object-Oriented Code with WordPress’s Hooks System
This article takes a practical look at one of the most immediate questions writing object-oriented code for WordPress: How should classes and objects interact with WordPress’s event-driven hooks system?
6. Introduction to Static Methods
Static methods are a somewhat advanced topic in object-oriented PHP that’s helpful to understand. This article introduces the topic and gives a simple code example.
PHP Static Methods in Depth: What They Are & How they Work in WordPress
Further Reading
Now that you understand the fundamentals of object-oriented programming in PHP, you’re more than ready to encounter WordPress’s two most important object-oriented systems: the Widgets API and WP_Query
.
Lastly, knowing how to combine object-oriented code with WordPress’s hooks system is most helpful for custom plugins you’ll design yourself—so if you haven’t dipped your toe into plugin development, now’s the time. Here’s a free Crowdcast video we recorded that walks you through writing a plugin from scratch.
Thanks for reading! As always, we’d love to hear any thoughts questions in the comments below, or in our Facebook group.