Create a child theme
A child theme is a folder that says “use Rural Blog, plus my changes”. Your edits live in it, so a theme update replaces the parent and leaves your work alone.
When you need one
- You want to override a template file — how.
- You want to add PHP — filters, hooks, a custom function.
- You have more than a handful of CSS rules. Below that, the Customizer’s Additional CSS is simpler — see Custom CSS.
You do not need one to change colours, fonts, layouts or widths. All of that is in the Customizer and already survives updates.
The two files
Make a folder wp-content/themes/rural-blog-child/ containing:
style.css
/*
Theme Name: Rural Blog Child
Theme URI: https://example.com/
Description: Child theme for Rural Blog.
Author: Your Name
Template: rural-blog
Version: 1.0.0
Text Domain: rural-blog-child
*/
Template: rural-blog is the load-bearing line — it must match the parent’s folder
name exactly.
functions.php
<?php
add_action( 'wp_enqueue_scripts', function () {
wp_enqueue_style(
'rural-blog-child',
get_stylesheet_directory_uri() . '/style.css',
array( 'rural-blog-style' ),
wp_get_theme()->get( 'Version' )
);
}, 30 );
Two details matter here:
- Depend on
rural-blog-style, the parent’s handle, so your CSS loads after it. - Priority 30, which is after the parent’s own inline Customizer CSS at 20 — otherwise your rules land before the settings you are trying to override.
Do not @import the parent stylesheet. It is slower and it loads at the wrong
time.
Activating it
Zip the folder and upload it under Appearance → Themes → Add New → Upload
Theme, or copy it into wp-content/themes/ by FTP. Then activate it.
What carries over
| Menus | ✅ assigned locations carry over |
| Widgets | ✅ |
| Posts, pages, media | ✅ untouched |
| Customizer settings | ❌ theme mods are per theme |
That last row is the surprise. Theme mods are stored against the active theme, so activating a child theme starts from the parent’s defaults, not from your settings.
Set the child theme up before you spend an evening in the Customizer, or be ready to redo those choices. If it is too late, the Customizer Export/Import plugin will move them across.
A screenshot
Drop a screenshot.png at 1200 × 900 into the child folder so the theme card in
Appearance → Themes is not blank.