Making a child theme for “Airi”

Question

I had chosen the Airi theme for my WordPress website. I planned to make some customizations and decided to use a child theme.
I had studied the WordPress documentation page https://developer.wordpress.org/themes/advanced-topics/child-themes/.
I had made a folder for the child theme, put new style.css and functions.php files there.
My functions.php was like this:

add_action('wp_enqueue_scripts', 'my_site_theme_enqueue_styles');
function my_site_theme_enqueue_styles()
{
    $parenthandle="airi-style"; 
    $theme = wp_get_theme();
    wp_enqueue_style( $parenthandle, get_template_directory_uri() . '/style.css', 
        array(),  
        $theme->parent()->get('Version')
    );
    wp_enqueue_style( 'my-site-style', get_stylesheet_uri(),
        array( $parenthandle,'airi-font-awesome' ),
        $theme->get('Version')
    );
}

Then I had activated the child theme. But the site representation wasn’t the same, as it was in the parent theme.
I had compared the output HTML of the child theme with the parent one and had found a ‘wp-custom-css’ block, that had been omitted in the child theme.

0
Sergey Beloglazov 2 months 2021-11-26T12:47:59-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse