Build a WordPress Child Theme and Customise Without Breaking the Parent
A child theme is a separate theme folder that borrows every file, template, and style from a parent theme while letting you add or override code in isolation. When the parent updates, your customisations stay intact because they live in their own directory. Without a child theme, any CSS tweaks, template edits, or PHP functions get wiped out the moment you click "Update" inside the WordPress dashboard.
For Australian site owners, this matters more than it might first appear. Many small businesses in Sydney, Brisbane, and Melbourne run WooCommerce stores or service pages on themes like Astra, Kadence, or GeneratePress, and they frequently customise colours, fonts, and layouts to match a brand. A child theme lets you hand the site over to a freelancer without worrying that their next theme update will undo months of work. It also keeps your workflow clean when you bill in AUD and need a reliable change log for the client.
Why a Child Theme Protects Your Work
The way WordPress loads themes is simple but often misunderstood. When a visitor opens a page, WordPress checks the child theme folder first; if the file exists there, it uses it, and if not, it falls back to the parent. This hierarchy is what makes overrides possible. You can replace a single template like single.php or header.php without touching anything else, which keeps the rest of the parent theme's code untouched.
This separation is also a security and stability win. If a snippet of custom PHP causes a fatal error, you can disable the child theme from the dashboard and the site returns to the parent's default state within seconds. Hosting providers such as those used by many Australian freelancers in Cremorne or Surry Hills often have one-click staging environments, and a child theme fits neatly into that workflow because it can be swapped between staging and production with a simple folder rename.
Creating the Folder and Minimum Files
Open your local site using a tool like Local WP, DevKinsta, or MAMP. Inside wp-content/themes/, create a new folder. A common convention is to append -child to the parent slug, so for a parent called kadence, the folder would be kadence-child. Inside that folder, create two files: style.css and functions.php.
The style.css file needs a header block at the very top, even before any CSS rules. The minimum fields are Theme Name, Template, and Version. The Template line must match the parent folder's exact slug — a typo here is the most common reason a child theme fails to activate. Once both files exist, the new theme will appear under Appearance → Themes, ready to activate.
Writing the Style.css and Functions.php the Right Way
A bare style.css header looks like this:
/*
Theme Name: Kadence Child
Template: kadence
Version: 1.0.0
*/
Below the header you can add your custom CSS. The functions.php file is where you enqueue the parent's stylesheet so the site actually loads the parent's design before your overrides kick in. The modern, recommended pattern is to use wp_enqueue_style with the parent handle as a dependency:
<?php
add_action( 'wp_enqueue_scripts', 'kadence_child_enqueue_styles' );
function kadence_child_enqueue_styles() {
wp_enqueue_style( 'kadence-parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'kadence-child-style', get_stylesheet_uri(), array( 'kadence-parent-style' ) );
}
Avoid the old @import url(...) trick inside style.css. It adds an extra HTTP request and breaks on some CDNs, including those used by Australian caching layers like those bundled with SiteGround or Cloudflare APO. A well-formed functions.php is also where you can drop small utility functions — for example, a function to register a portfolio post type for a Brisbane design studio or a shortcode that outputs the business's ABN on the footer.
Overriding Templates and Adding Custom Functionality
Once the basics are working, the real value of a child theme shows up in template overrides. Copy template-parts/header.php from the parent into the child folder, make your edit, and WordPress will use your version automatically. This is how Australian agencies customise navigation menus to comply with accessibility audits required under the Disability Discrimination Act, or how they add local schema markup for a Sydney trades business.
For deeper changes, the functions.php file accepts hooks and filters. Hooks like after_setup_theme let you register new image sizes, while filters like the_content let you append or modify post output. A common pattern is adding a custom block pattern directory using register_block_pattern_category, which keeps all client-specific patterns inside the child theme rather than the site editor's global settings. If you want a deeper walk-through on plugin-level customisation alongside this approach, the guide on trusted affiliate reviews covers how to extend functionality without bloating the theme.
Testing, Staging, and Going Live Safely
Never push a new child theme directly to a live site. Set up a staging copy first — most Australian hosts like VentraIP, Panthur, or hosting resellers in the Melbourne CBD offer free staging with their managed WordPress plans. Migrate the child theme folder via SFTP or Git, then walk through every page template, the WooCommerce checkout if present, and the mobile menu on both iOS Safari and Android Chrome.
Run a quick sanity check by switching back to the parent theme temporarily. If the site looks identical to the parent, your overrides are clean and you have not introduced hidden dependencies. Then switch back to the child, clear any caching layer, and verify the front end matches the staging copy. Security hardening matters here too; a misconfigured child theme can expose file paths, so it's worth pairing your setup with a vetted security layer as outlined in essential WordPress security plugins to keep client sites locked down against the brute-force scans that frequently hit .com.au domains.
The single thing worth remembering is that a child theme is a contract between you and the next person who touches the site. Keep its folder small, comment anything non-obvious inside functions.php, and store the parent theme's version number somewhere visible so future updates are predictable. When you hand the project to another developer in Adelaide or Perth, leave them a short README inside the child folder describing what was customised and why — that one habit saves hours of reverse-engineering later.