When I first started working with WordPress, I often started with very basic themes and hacked away at them to clear all of the unwanted code. I started recognizing which parts were important to my workflow, and which parts I could do without. I don’t know about you, but I often start my development with some basic components and use common classes and ids across sites.
Eventually, I took all of those elements and common styles and created a very basic, mostly style-free base theme. I use this theme as a starting point for all WordPress development. So when I’m handed a Photoshop document with a design, I don’t have to waste time creating basic HTML structure and styles.
As the years went by, the theme has evolved. For instance, my colleague often gives me a snippet of code to add to functions.php to stop some unwanted default WordPress behavior. I add that code to the development theme so it is ready for me when I start building out another site. As your coding experience progresses and the trends of modern web design change, your theme will evolve with it.
Some Things to Consider Adding
If you find yourself using Font Awesome icon fonts, why not put a link to the CDN in header.php? If you often use custom post types, add that to your functions.php file and comment out until needed. These are things that I use often, but if I don’t t need them, it’s so easy just to delete them.
More recently, my base style sheet comes equipped with custom reusable styles conducive for a simple responsive structure. developed by my colleague, Mike Lee. This helps keep my style sheet lean and promotes good practices. This works for me, but use your instincts to create what works best for you.
With deadlines looming, being able to save an hour or two is key. So taking some time between projects to work on your base theme can save you countless hours in the future. Coding smart and efficiently should be your mantra.