Category: Back-End Development
Where and How to Use WordPress Hooks in Objects
You’ve maybe noted that we’ve recently been writing about WordPress and object-oriented programming in PHP a lot. Just last week, Fred published an article about PHP magic methods, especially __construct, and how they work. This week I want to tackle a very common and oft-debated question about WordPress and OOP: when I use WordPress hooks, where do they go on my objects?
Object-Oriented PHP: The __construct() Magic Method
In this article, we tackle an intermediate topic in object-oriented PHP: magic methods, specifically __construct().
How to Submit WordPress Posts from the Frontend
You might want add new posts without having to log into the WordPress dashboard, or maybe allow your visitors a way to submit content of their own. You can do it. Figuring out how to submit a post from the front end is straightforward. In this article, we’ll cover a few ways you can create a new post form and save its results into a real, live WordPress post.
WordPress Theme Development: Adding Functionality with functions.php
This article introduces one of the most important topics in WordPress development: functions.php. The functions file is one of the complex, interesting, and powerful in the arsenal of a WordPress theme. What follows
Understanding Class Inheritance (Child and Parent Classes) in Object-Oriented PHP
Last time, we covered the fundamentals of object-oriented programming (OOP) in PHP: what an object is, what a class is, and how they interact.
Introduction to Object-Oriented PHP for WordPress Developers
Our goal today is introduce object-oriented programming in PHP, as the basis to discuss OOP in WordPress.
How to Prevent Browser Caching of a CSS Stylesheet in WordPress
This video and text Quick Guide explains how to prevent browser caching of CSS files, with a special focus on doing this for WordPress sites.
PHP Static Methods in Depth: What They Are & How they Work in WordPress
One of the things that often confuses people new to object-oriented PHP is what are called “PHP static methods” and “static properties”. They’re often confusing, because you simply aren’t used to the syntax, which is a PHP double-colon (::) where you might expect an arrow (->). But, I’m getting ahead of myself.
Learn WordPress Development: The Basic Course
WordPress development is a massively useful skill, but it’s also tricky to learn—especially if you learn things in a piecemeal way that allows basic confusions to persist while you try to tackle advanced topics.