greenpeace / planet4-child-theme-switzerland
Child theme for the swiss website in the Planet 4 project.
Package info
github.com/greenpeace/planet4-child-theme-switzerland
Type:wordpress-theme
pkg:composer/greenpeace/planet4-child-theme-switzerland
Requires (Dev)
- wp-coding-standards/wpcs: ^3.0
- dev-master
- v2.0.48
- v2.0.47
- v2.0.46
- v2.0.45
- v2.0.44
- v2.0.43
- v2.0.42
- v2.0.41
- v2.0.40
- v2.0.39
- v2.0.38
- v2.0.37
- v2.0.36
- v2.0.35
- v2.0.34
- v2.0.33
- v2.0.32
- v2.0.31
- v2.0.30
- v2.0.29
- v2.0.28
- v2.0.27
- v2.0.26
- v2.0.25
- v2.0.24
- v2.0.23
- v2.0.22
- v2.0.21
- v2.0.20
- v2.0.19
- v2.0.18
- v2.0.17
- v2.0.16
- v2.0.15
- v2.0.14
- v2.0.13
- v2.0.12
- v2.0.11
- v2.0.10
- v2.0.9
- v2.0.8
- v2.0.7
- v2.0.6
- v2.0.5
- v2.0.4
- v2.0.3
- v2.0.2
- v2.0.1
- v2.0.0
- v1.0.156
- v1.0.155
- v1.0.154
- v1.0.152
- v1.0.151
- v1.0.150
- v1.0.149
- v1.0.148
- v1.0.147
- v1.0.146
- v1.0.145
- v1.0.144
- v1.0.143
- v1.0.142
- v1.0.141
- v1.0.140
- v1.0.139
- v1.0.138
- v1.0.137
- v1.0.136
- v1.0.135
- v1.0.134
- v1.0.133
- v1.0.132
- v1.0.131
- v1.0.130
- v1.0.129
- v1.0.128
- v1.0.127
- v1.0.126
- v1.0.125
- v1.0.124
- v1.0.123
- v1.0.122
- v1.0.121
- v1.0.120
- v1.0.119
- v1.0.118
- v1.0.117
- v1.0.116
- v1.0.115
- v1.0.114
- v1.0.113
- v1.0.112
- v1.0.111
- v1.0.110
- v1.0.109
- v1.0.108
- v1.0.107
- v1.0.106
- v1.0.105
- v1.0.104
- v1.0.103
- v1.0.102
- v1.0.101
- v1.0.100
- v1.0.99
- v1.0.98
- v1.0.97
- v1.0.96
- v1.0.95
- v1.0.94
- v1.0.93
- v1.0.92
- v1.0.91
- v1.0.90
- v1.0.89
- v1.0.88
- v1.0.87
- v1.0.86
- v1.0.85
- v1.0.84
- v1.0.83
- v1.0.82
- v1.0.81
- v1.0.80
- v1.0.79
- v1.0.77
- v1.0.76
- v1.0.75
- v1.0.74
- v1.0.73
- v1.0.72
- v1.0.71
- v1.0.70
- v1.0.69
- v1.0.68
- v1.0.67
- v1.0.66
- v1.0.65
- v1.0.64
- v1.0.63
- v1.0.62
- v1.0.61
- v1.0.60
- v1.0.59
- v1.0.58
- v1.0.57
- v1.0.56
- v1.0.55
- v1.0.54
- v1.0.53
- v1.0.52
- v1.0.51
- v1.0.50
- v1.0.49
- v1.0.48
- v1.0.47
- v1.0.46
- v1.0.45
- v1.0.44
- v1.0.43
- v1.0.42
- v1.0.41
- v1.0.40
- v1.0.38
- v1.0.37
- v1.0.36
- v1.0.34
- v1.0.33
- v1.0.32
- v1.0.31
- v1.0.30
- v1.0.29
- v1.0.28
- v1.0.27
- v1.0.26
- v1.0.25
- v1.0.24
- v1.0.23
- v1.0.22
- v1.0.20
- v1.0.19
- v1.0.18
- v1.0.17
- v1.0.16
- v1.0.15
- v1.0.14
- v1.0.13
- v1.0.12
- v1.0.11
- v1.0.10
- v1.0.9
- v1.0.8
- v1.0.7
- v1.0.6
- v1.0.5
- v1.0.4
- v1.0.3
- v1.0.2
- v1.0.1
- v1.0.0
- v0.1.39
- v0.1.35
- v0.1.34
- v0.1.33
- v0.1.32
- v0.1.31
- v0.1.30
- v0.1.29
- v0.1.28
- 0.1.27
- v0.1.26
- 0.1.25
- v0.1.24
- v0.1.23
- 0.1.22
- v0.1.21
- v0.1.20
- v0.1.18
- v0.1.17
- v0.1.16
- v0.1.15
- v0.1.14
- v0.1.13
- v0.1.12
- v0.1.11
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- 0.1.4
- v0.1.3
- v0.1.1
- v0.1
- dev-develop
- dev-release/v2.0.49
- dev-release/v2.0.48
- dev-feature/ES-343-food-block-updates-2
- dev-release/v2.0.47
- dev-feature/ES-343-food-block-updates
- dev-copilot/sub-pr-377
- dev-copilot/sub-pr-377-again
- dev-feature/ES-483-event-end-date
- dev-feature/ES-586-remove-gap
- dev-release/v2.0.46
- dev-feature/ES-479-improve-name-validation
- dev-feature/ES-395-quiz-block-mixpanel-tracking
- dev-feature/ES-396-quiz-block-scores
- dev-release/v2.0.45
- dev-feature/ES-448-header-font-size-fix
- dev-clean-up-css-variables
- dev-release/v2.0.44
- dev-feature/ES-347-new-now-robots-function
- dev-release/v2.0.43
- dev-feature/ES-346-fix-events-on-mobile
- dev-release/v2.0.42
- dev-feature/ES-355-github-actions
- dev-release/v2.0.41
- dev-feature/ES-305-food-quiz
- dev-feature/ES-342-magazine-styles
- dev-feature/ES-325-merge-blocks-plugin
- dev-release/v2.0.40
- dev-feature/ES-334-fix-time-in-events
- dev-feature/ES-319-copyright-sign-in-posts
- dev-feature/ES-244-turnstile-1-click
- dev-feature/ES-239-1-click-faster-redirect
- dev-feature/ES-82-remove-archived-content
- dev-feature/ES-201-clear-important-pages
- dev-feature/ES-295-header-padding-fix
- dev-feature/ES-316-load-more-margin
- dev-feature/ES-226-city-nomination
- dev-feature/ES-232-remove-redirect-hook
- dev-feature/ES-275-form-field-margins
- dev-feature/ES-294-fix-publications-layout
- dev-feature/ES-238-timber2
- dev-feature/ES-236-hidden-fields-in-1click
- dev-feature/ES-236-data-in-1-click-forms
- dev-feature/ES-229-customisation-additional-text
- dev-feature/ES-27-validate-names
- dev-feature/ES-44-fix-table-of-content-links
- dev-feature/ES-68-personalised-text
- dev-feature/ES-152-1-click-petition
- dev-feature/ES-215-remove-category-filter
- dev-feature/ES-199-action-boxout-fix
- dev-feature/ES-193-actions-list-style
- dev-feature/ES-191-fix-privacy-page-permissions
- dev-feature/ES-194-query-loop-list-layout
- dev-feature/ES-195-quote-block-layout
- dev-feature/ES-178-pagination-style
- dev-feature/ES-175-related-posts-metadata
- dev-feature/ES-177-multistep-form-styles
- dev-feature/ES-173-publications-style
- dev-feature/ES-174-show-related-posts
- dev-feature/ES-166-image-choices-form
- dev-feature/P4-149-business-cards-languages
- dev-feature/P4-82-business-cards
- dev-feature/P4-131-normalize-phone-numbers
- dev-feature/P4-139-limit-name-field-characters
- dev-feature/P4-135-fix-tag-manager-in-posts
- dev-feature/P4-106-post-list-covers-style
- dev-feature/P4-122-remove-bottom-navigation
- dev-feature/P4-8-phone-validation
- dev-feature/P4-108-timeline-style
- dev-feature/P4-97-story-margins
- dev-feature/P4-49-gravity-pdf
This package is auto-updated.
Last update: 2026-03-17 13:56:00 UTC
README
Child theme for the Planet 4 Wordpress project. The related master theme’s code lives at:
https://github.com/greenpeace/planet4-master-theme.
Please check the master theme code for more information.
Development
Coding standards
Using mostly WordPress coding standards, with a few exceptions.
Make sure to use the configured code linters for PHP, JS, CSS and Markdown. See package.json for the commands.
Stylesheets
Three stylesheets are generated using SCSS:
sass src/scss/style.scss style.css --style=compressed sass src/scss/editor-style.scss admin/css/editor-style.css --style=compressed
Translations
- Export a pot file using wp-cli (Don't use WPML for the .pot file, it will not contain the references where the strings are used). When used inside the dev environment:
npx wp-env run cli wp i18n make-pot wp-content/themes/planet4-child-theme-switzerland/ wp-content/themes/planet4-child-theme-switzerland/languages/planet4-child-theme-switzerland.pot
If your most up to date translation is in WPML:
- Scan the theme using for new translation strings using WPML. Make sure the scanning of Javascript is enabled if you need to find strings in JS.
- Update the translations in WPML string translation
- Export .po files for each language from WPML and save them to the theme's /languages folder: 3.1 Go to WPML String Translation 3.2 Filter by the translation domain you want to export 3.3 Select all strings 3.4 Export a .po file without translations and a separate one for each language. The export functionality is below the strings table.
- Update the po files to also contain the references to where the strings are used using POEdit: 4.1 Open each .po file in POEdit 4.2 Go to Translation -> Update from .pot file and select the .pot file exported in 1. 4.3 Save
If your most up to date translations are in .po files, use the same process, but don't overwrite the .po files from WPML
- Generate the JSON files needed to translate strings in JS files:
npx wp-env run cli wp i18n make-json wp-content/themes/planet4-child-theme-switzerland/languages/ - Rename the generated JSON files. The hashes are not needed, but make sure the language code is exactly the same as the language. So for us
de_CH,fr_FRandit_CH.defor example doesn't work as a fallback. A valid name is for example:planet4-child-theme-switzerland-de_CH-planet4-child-theme-switzerland-food-quiz-view-script
PHPStorm settings
File watchers for SCSS
File > Settings > Tools > File Watchers
Main style.css
File Type: SCSS Style Sheet
Scope: Create a scope that:
- Includes
src/scss - Excludes
/src/scss/editor-style.scss
Program: sass
Arguments:
--no-cache --update $FileName$:$ProjectFileDir$/$FileNameWithoutExtension$.css --style compressed
Output paths to refresh:
$ProjectFileDir$/$FileNameWithoutExtension$.css
editor-style.css
File Type: SCSS Style Sheet
Scope: Create a scope that:
- Includes
src/scss - Excludes
/src/scss/style.scss
Program: sass
Arguments:
--no-cache --update $FileName$:$ProjectFileDir$/admin/css/$FileNameWithoutExtension$.css --style compressed
Output paths to refresh:
$ProjectFileDir$/admin/css/$FileNameWithoutExtension$.css