Who hasn’t thought or said that to yourself or others? If you’ve worked with WordPress on any serious project, or even if you’ve only worked with WordPress for small sites, there will almost certainly come a time when one or both of these phrases will pop into your head. Or out of your mouth.
Let’s get something out of the way right from the get-go. WordPress was, is, and likely always will be, a lean, mean, framework for blog-style and relatively basic websites. WordPress was designed for simple sites, like blogging. Hell, it was even in their configuration file!
For nearly two decades, the WordPress configuration file contained the text “/* That’s all, stop editing! Happy blogging. /” Then with little to no fanfare, that text became “/ That’s all, stop editing! Happy publishing. */” Bam! Just like that, WordPress went from a blogging platform to a full-blown publishing solution. Except, it didn’t.
As mentioned earlier, WordPress is a lean, mean platform for basic sites. Virtually everything else requires, dare I say the ‘P’ word, a plugin. That word should not cause trepidation. Oh, but it frequently does. Why? Because you need a plugin to do pretty much anything beyond the absolute basics in WordPress.
Let’s say you write a post and you want to publish next week on a Friday at 5PM. Yeah! WordPress can do that. Oh, you only want the post to be live for a week and then disappear? Plugin! Okay, to be completely honest, you do not need a plugin to do that. You also have an alternative that involves the ‘C’ word. Yes, that’s right: Code Snippet. Yikes!
Code snippets are easy to implement if you have a basic understanding of PHP. You know PHP, right? PHP (PHP: Hypertext Preprocessor) is a widely used, open-source server-side scripting language primarily designed for web development. WordPress is built entirely using PHP. As are all WordPress themes and plugins. Why would you need to know anything (or even care) about PHP? Code snippets.
If you want to extend WordPress beyond its very limited feature set, you will need: a. plugin, b. code snippet, or c. both! Are plugins and code snippets bad? That depends on who you ask. If you are a casual WordPress user, you might not care about installing a bunch of plugins. You might even risk editing a PHP file or two.
Be warned that PHP is very unforgiving when it comes to even the teensiest syntax mistakes. That does not apply to just WordPress, that applies to everything PHP. Misplace or forget a semicolon or bracket, mismatch the case, and your site crashes. Because when it comes to PHP, almost everything matters.
PHP is not hard per se, it simply requires accuracy. Those unfamiliar with basic PHP coding should exercise extreme caution when editing a PHP. That said, if you must edit a PHP file, there is a method you can use that will help minimize potential problems. Utilizing free and open source solutions while following a process is the only way to go for most people. You can read more about that here.

