WPMozo: add-ons and tools for WordPress and Elementor
⚡ WordPress · Client-side · No data sent to server

WordPress Child Theme Generator

Fill in your parent and child theme details and instantly get a ready-to-use style.css and functions.php for a WordPress child theme. Classic and block (FSE) themes supported. Everything runs in your browser.

Parent Theme
Child Theme
Options

Adds a wp_enqueue_scripts hook that loads the parent and child stylesheets. Only applies to classic themes.

Theme type

Classic themes rely on wp_enqueue_scripts to load the parent stylesheet before the child stylesheet.

Copied!
Copied!
100% in your browser. No data leaves your device. Create a new folder inside wp-content/themes/, drop these files in, then activate the child theme from Appearance → Themes.

About this tool

What is a WordPress child theme?

A child theme is a theme that inherits all the templates, styles, and functions of another theme (the parent theme) while letting you safely override or extend them. It lives in its own folder inside wp-content/themes/ and is activated like any other theme.

Why use a child theme?

When you modify a commercial or downloaded theme directly, your changes are wiped out every time the theme updates. A child theme solves this: the parent receives security and bug-fix updates while your customisations stay untouched. It is the safest way to customise any WordPress theme you did not write from scratch.

What files does a child theme need?

At minimum, a child theme needs one file: style.css. The comment block at the top of that file is how WordPress recognises the theme and links it to its parent via the Template: field. Without that field pointing to the exact parent folder name, the child theme will not work.

Classic (PHP-based) themes also need a functions.php to enqueue the parent stylesheet before the child stylesheet. Skipping this step means the parent styles never load and the site looks broken. Block (FSE) themes handle stylesheet loading automatically, so no PHP enqueue hook is required.

Classic themes vs block (FSE) themes

Classic themes use PHP template files (single.php, archive.php, etc.) and rely on wp_enqueue_scripts to load CSS. Twenty Twenty-One and most third-party themes like Divi are classic themes.

Block themes (also called Full Site Editing themes) use HTML template files and theme.json for design tokens. WordPress automatically loads the parent stylesheet when it detects a child theme, so the functions.php enqueue pattern is unnecessary. Twenty Twenty-Two, Twenty Twenty-Three, and Twenty Twenty-Four are block themes.

How to use the generated files

  1. Create a new folder in wp-content/themes/. The folder name should be a lowercase, hyphenated version of your child theme name (e.g. my-custom-theme).
  2. Save the generated style.css into that folder.
  3. If you are using a classic theme, also save the generated functions.php into the same folder.
  4. Log in to your WordPress admin and go to Appearance → Themes. Your child theme will appear in the list. Activate it.
  5. Add your customisations to the child theme's functions.php or create new template files to override the parent.
DiviExtended: premium Divi child themes and plugins