Functions.php And How To Quit It

When developing a theme for a client, it’s super easy to throw all of the new functions and hooks into the theme’s functions.php file, wipe your hands, congratulate yourself for a hard day’s work and go have a beer. But, after a while, have you stopped to see the size of that functions.php file? It can be massive! It’s easy to create a large disorganized functions.php file with so many tutorials out there giving you little tips and tricks on hooks and doodads that you can add to the site to make it fancy. “Ohh! Look at this code that changes my background color based on weather patterns! I’ll just… put this… right… here… *drops in functions.php file* This session is about why you don’t want to fill up your functions.php file, the proper way to add code to your site, and why it’s proper for readability, security and extendability.