Rural Blog docsAll pages

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 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:

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.

Next