This is a sample master Wordpress theme to be used for Greenpeace Planet4 project. You can learn more about this project on the planet4 blog.
This theme is used in planet4 base wordpress site.
This theme is based on the timber/starter-theme
codebase.
It has a correlated sample child theme.
You can use the theme in Wordpress directly. It is already included as a dependency for planet4 base site in composer.json
"require": {
...
"greenpeace/planet4-wordpress": "4.7.2",
"greenpeace/planet4-master-theme" : "0.1.0",
"greenpeace/planet4-child-theme" : "0.1.2",
...
},
By default the child theme is used but you can activate the master theme
by specifying it in wp-cli.yml
like:
theme activate:
- planet4-master-theme
You can then run composer run-script theme:activate
to activate it.
For development, you will require a couple of tools.
- nodejs version >= 6
- yarn as npm client, front-end dependency manager
- Composer as PHP dependency manager
- Clone this repository
git clone [email protected]:greenpeace/planet4-master-theme.git
- You then need to install the dependencies:
npm install
The following packages will be installed as dependencies
- Link this project to your planet4 site to use this theme
cd /path/to/planet4-base/public/wp-content/themes
rm -rf planet4-master-theme
ln -s /path/to/planet4-master-theme .
- Edit the CSS in src/css
- Rebuild the main.css
yarn build
- Test it on your local setup
- If everything is fine, commit your changes
- Tag your new version
git tag -a v0.x.x -m 'v0.x.x'
git push origin v0.x.x