I know what you’re thinking … “A WordPress post?! I thought this guy drank the Ruby on Rails Kool-Aid.” Truth is, I never really stopped WordPress development, I was simply looking to expand my horizons a bit. I still use WordPress daily for personal blogs and work-related activites. It’s good at its job, which is either as a blog or an easily extendable CMS-like solution.
Anyways … in developing my WordPress themes, I try to keep everything as modular as possible. Here’s my general file structure for anything not WordPress-centric:
|- assets/ |- img/ |- inc/ |- functions/ |- templates/ |- vendor/ |- js/ |- sass/
This is of course a high-level overview, but let me explain a bit:
- the img folder holds all images
- the inc folder holds all PHP includes
- the functions folder holds all theme-centric functions. More on this folder in a bit.
- the templates folder holds all theme-centric templates to keep everything DRY
- the vendor folder holds all plugin / framework related things that I’ve accumulated over the years to help with development (WPAlchemy, etc)
- the sass folder holds all Sass files, again, to keep everything modular