Category: Back-End Development
get_queried_object(): How and Why to Use It
WordPress’s get_queried_object() function has the distinction of being, I think, the most useful core function in WordPress that I didn’t know about for the longest time.
Learning PHP: Concatenate Strings and Variables Efficiently
A slightly weird term you’ll hear people use around PHP: “concatenate.” I still remember the first time I heard that word, having no earthly idea what it meant. It turns out it was a common and useful task in PHP: join two strings together so that we get a single string or something that we can echo to the screen.
Cool New PHP 7 Features for WordPress Developers
PHP has changed a lot in the last few years. And even before that, it had changed a lot. In short, modern PHP is a great and cool language, with only a few of the worst problems that people who last used it a decade age will remember. (Modern) PHP 7 and WordPress haven’t really gone together historically.
Learning PHP for WordPress Development: while() Loops
Welcome to this discussion of PHP loops: what loops are, whey they’re important, and how to use PHP while() loops. This article continues our series explaining the basics of PHP for WordPress development.
Learning PHP for WordPress Development: Control Flow Basics
Welcome to this introduction to PHP control flow! This article continues our series explaining the basics of PHP for WordPress development.
Understanding PHP Globals and Variable Scope in WordPress
One of the most maligned features of WordPress is the use of “PHP global variables.” Whether you love them or hate them, global variables probably aren’t leaving WordPress soon. So today we’ll cover all there is to know about them. How to think about them. How you, in PHP, make variables global, access WordPress’s global variables, and a little about the theory and debate about global state in software applications.
Learning PHP for WordPress Development: How to Include PHP in HTML
Welcome to this article on how to use PHP in HTML! Here, we try to get specific about exactly how PHP and HTML interact, at the level of a specific .php file. In other words, how do you actually include PHP in HTML, and what rules can and can’t you follow in weaving PHP and HTML together?
WordPress’s get_template_part() function: What and Why
This article introduces an important concept in WordPress themes: the WordPress get_template_part function. It’s one of the many important concepts of WordPress theme development. Mastering WordPress theme development is an important milestone in understanding WordPress development more generally. (We have a full free course on the topic, check it out.)
Learning PHP for WordPress Development: Understanding PHP’s return
Welcome to this rundown on return in PHP! This article continues our series explaining the basics of PHP for WordPress development.