By micah | Wed, 12/09/2015 - 18:08
Using zurb-foundation and a custom child theme
So, to first quote the wordpress site directly:
There are a few reasons why you would want to use a child theme:
- If you modify a theme directly and it is updated, then your modifications may be lost. By using a child theme you will ensure that your modifications are preserved.
- Using a child theme can speed up development time.
- Using a child theme is a great way to learn about WordPress theme development.
I would wholeheartedly agree with everything said there. There are tons of ‘starter’ themes out there which are meant to be modified to your taste… but that just erks me.. Like they said, if there was ever a critical update to that starter theme, then you’d have to go in manually and find out what it was and make all the modifications yourself, else risking code overwrites.
All this can be argued and benefits / cons can be measured and compared, but that’s not what I’m going to hash out.
This is not a tutorial though, on how to use it with wordpress. Instead it’s just an overview.
The parent theme can be found here at the moment:
The child boilerplate-ish theme can be found here:
Just like Drupal-ish...
So yeah, we’re going with the same idea of using an outside /UI folder to store all the compilation stuff.
Running Grunt and ‘npm install’ and all that works the same way. The parent theme contains all the base SCSS stuff from foundation as well.
We’ve yet to do stuff with specifying particular JS when you compile foundation, but it will work with just the full ready JS as it is now.
Just stick the parent theme in the /themes/ folder, and you don’t even need to enable it.
The /UI folder goes in the [root] of the wordpress install, just like Drupal.
The cmmwordpressboiler folder goes in the /themes/ as well. Just have to name it to whatever is appropriate for you project.
Be sure to update the “theme_path:” variable in the gruntfile, to point to your child theme directory.