Child themes inherit parent and override specific templates — never modify parent theme directly.
Child Themes
# Never modify parent theme -- updates overwrite changes!
# Child theme inherits parent, override what you need
# 1. Create: wp-content/themes/my-theme-child/
# 2. style.css (required)
/*
Theme Name: My Theme Child
Template: my-theme
Version: 1.0.0
*/
# 3. functions.php -- enqueue parent styles
add_action('wp_enqueue_scripts', function() {
wp_enqueue_style(
'parent-style',
get_template_directory_uri() . '/style.css'
);
});
# 4. Override templates
# Copy single.php from parent into child folder
# WordPress automatically uses child version
# 5. Override functions safely
if (!function_exists('parent_breadcrumbs')) {
function parent_breadcrumbs() { /* your version */ }
}