| name | wp-child-theme |
| description | Scaffold and deploy a WordPress child theme via SSH. Generates style.css, functions.php (with correct parent style enqueueing), and index.php. Supports Kadence, Astra, GeneratePress, Hello Elementor, OceanWP, and any custom parent. Can activate the child theme immediately after creation.
|
| triggers | ["create child theme","child theme","scaffold theme","new child theme","Kadence child","Astra child","Elementor child theme"] |
Skill: wp-child-theme
Scaffolds a correctly structured WordPress child theme and uploads it to the
server via SFTP. Handles the right way to enqueue parent styles (not @import).
Usage
python scripts/management/wp-child-theme.py --config config/config.yaml --list-parents
python scripts/management/wp-child-theme.py --config config/config.yaml \
--parent kadence --child-name "My Kadence Child"
python scripts/management/wp-child-theme.py --config config/config.yaml \
--parent hello-elementor \
--child-name "Client Site Theme" \
--child-slug client-site-theme \
--activate
python scripts/management/wp-child-theme.py --config config/config.yaml \
--parent astra \
--child-name "Agency Client Theme" \
--child-slug agency-client-child \
--author "Agency Name" \
--description "Custom child theme for Agency client site" \
--version "1.0.0"
Files created
| File | Contents |
|---|
style.css | Theme header with correct Template: field pointing to parent |
functions.php | Parent + child style enqueueing via wp_enqueue_scripts hook |
index.php | Silent fallback (// Silence is golden.) |
Supported parent themes
| Slug | Theme |
|---|
kadence | Kadence |
astra | Astra |
generatepress | GeneratePress |
hello-elementor | Hello Elementor |
oceanwp | OceanWP |
blocksy | Blocksy |
neve | Neve |
twentytwentyfour | Twenty Twenty-Four |
| Any slug | Custom parent โ reads name from style.css |
The right way to enqueue parent styles
The script generates the correct approach โ never @import in style.css:
@import url("../parent-theme/style.css");
function mytheme_enqueue_styles() {
wp_enqueue_style( 'parent-style',
get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( 'parent-style' ) );
}
add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_styles' );
After scaffold
- Activate: via
--activate flag or WP Admin โ Appearance โ Themes
- Customise CSS: add to
wp-content/themes/YOUR-CHILD/style.css
- Override templates: copy template files from parent, edit in child
- Add functions: add to
wp-content/themes/YOUR-CHILD/functions.php
- Audit: run
wp-theme-audit.py to verify nothing unexpected was inherited
Kadence-specific notes
Kadence uses a custom fonts/colours system via the Customizer. Child theme
inherits all Kadence settings. To override:
- Customizer: Appearance โ Customise โ Global Colours / Typography
- Kadence Blocks: use Global Styles in the block editor
- CSS: target
.kadence-* and .wp-block-kadence-* classes