How to Create a Site Specific Plugin

A common question I get when supporting WordPress users is “where to I put this custom code snippet.” A frequent and simple answer to that question is, “In your theme’s functions.php file.” While that’s not necessarily a wrong answer, it’s not the best answer. Putting custom code snippets in your theme’s functions.php means that if […]

Don’t Use do_shortcode()

The Internet abounds with examples of bad practices in WordPress development. Using do_shortcode() unnecessarily is one of the most pervasive. do_shortcode() runs a fairly extensive regex (regular expression) that has to go through every possible shortcode. Konstantin Kovshenin has a good explanation of this: That regex looks for all registered shortcodes within a string. For each match, […]