Understanding PHP Output Buffering, and Why It’s Great for Shortcodes
When I was learning PHP, one of the first things that really stumped me was the difference between code that created output and code that didn’t. I knew, vaguely, that things that had an echo statement in PHP meant something important, but that was about it. What I now get, is that echo statements are essentially output generators: they “leak out” of other PHP code. They create meaningful, visible output, most other PHP code doesn’t. Most other PHP code will transform data, but it won’t show it to users. But what we’re focusing on here is that you can actually capture, store, and use echoed output. This is called “output buffering” and it initially confused me and then blew my mind.
Making Your First WordPress Shortcode
One of my favorite features of WordPress (as a developer) is shortcodes. I think they’re not super great to hand off to end users, but I find they’re fantastic for both
Classic Do-It-Yourself WordPress Mistakes To Avoid
As a very powerful, well-documented, and relatively user-friendly CMS, WordPress attracts a lot of do-it-yourself energy.
Write Faster With WordPress’ Shortcodes
WordPress has many somewhat hidden features and one of my favourites are shortcodes. In this post we’ll learn exactly what they are, when to use them, why they’re so brilliant and how to use them.