[ad_1]
Hello,
I did all my css customizations in the current Twenty Twenty Two theme so far. I only customized the style.css
Maybe a bit late but I want to create a Child theme now so the work is saved when updating WordPress.
So I created a directory “twentytwentytwo-child” in the themes folder and a functions.php, a sreenshot.png and a style.css inside. The style.css is the same as the parent style.css with custimzed header:
/*
Theme Name: Twenty Twenty-Two Child
Theme URI:
Description: Child Theme of Twenty Twenty-Two
Author: Christian Leithold
Author URI:
Template: twentytwentytwo
Version: 1.2
License: GNU General Public License v2 or later
License URI:
Text Domain: twentytwentytwo-child
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments
*/The functions.php is:
<?php
/*
* Child theme stylesheet einbinden in Abhängigkeit vom Original-Stylesheet
*/
function child_theme_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-theme-css', get_stylesheet_directory_uri() .'/style.css' , array('parent-style'));
}
add_action( 'wp_enqueue_scripts', 'child_theme_styles' );?>Unfortunately the Child theme doesn’t behave as it should. (It should look like the current Parent Theme). My Custom Header and Footer aren’t present in the Child theme and I also can not choose them in Gutenberg Editor. They are not there.
The current Child Theme looks like:
Currently the website loads the Parent Theme. The Child Theme should look the same.
Thanks in advance
Christian
- This topic was modified 5 hours, 8 minutes ago by .
The page I need help with: [log in to see the link]
