• Resolved itislp

    (@itislp)


    Fantastic theme! I love how clean it is!

    However, I am trying to create a child theme to make mild adjustments with the functions.php / css files that will not be overwritten during an update but it does not render the stylesheets correctly.

    Using both manual creation and plugin (child themes configurator) for the child themes renders a child theme to use but when viewing the site, the style sheet is not applied correctly and it just shows the site without styling.

    Any help is greatly appreciated!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Can you post a link to your site with the child theme active?

    Thread Starter itislp

    (@itislp)

    UPDATE: I got it…just had to manually copy all of the .css files from the original to the child-theme folder via FTP.

    Thanks for responding!

    Looks like a minor issue with the theme. The actual stylesheet doesn’t get loaded correctly if you’re using a child theme because the author uses get_stylesheet_directory_uri() instead of get_template_directory_uri() in functions.php.

    For now, you could work around this issue by making a child theme manually. You need two files:

    style.css:

    /*
    Theme Name: Hellish Simplicity Child
    Template: hellish-simplicity
    */
    
    /* Changes below this line
    --------------------------*/

    And functions.php:

    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 20 );
    function theme_enqueue_styles() {
        wp_dequeue_style( 'style' );
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style-compiled.css' );
        wp_enqueue_style( 'child-style', get_stylesheet_uri(), array( 'parent-style' ) );
    }

    You should place these two files in your child theme’s folder, replacing any files of the same name that are already there.

    Theme Author Ryan Hellyer

    (@ryanhellyer)

    I’m not sure how you intended the stylesheets to load, but I created a demo child theme for those who are unsure how to create child themes.
    https://geek.hellyer.kiwi/themes/hellish-simplicity/#child-themes

    Just please be aware of future updates messing with whatever changes you make.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘child theme’ is closed to new replies.