• File: includes/theme-scripts.php
    Line: 9

    Old: wp_register_style( 'graphene-stylesheet', get_stylesheet_uri(), array(), false, 'screen' );
    New: wp_register_style( 'graphene-stylesheet', GRAPHENE_ROOTURI . '/style.css', array(), false, 'screen' );

    Description:
    get_stylesheet_uri() points to the current theme (e.g. child) file instead of the graphene theme file which is located in GRAPHENE_ROOTURI which is get_template_directory_uri().

Viewing 2 replies - 1 through 2 (of 2 total)
  • Theme Author silverks

    (@silverks)

    The change was made in order to maintain consistency with WordPress recommended practice, where you will need to enqueue the parent stylesheet in your child theme.

    This was different than how child themes used to be created, by using @import in the child theme’s style.css file to load the parent theme’s stylesheet. That method was being deprecated because it was less efficient. You will need to modify your child theme to use the new method instead.

    See this page for more details:
    https://codex.ww.wp.xz.cn/Child_Themes#Creating_a_Child_Theme_from_an_Unmodified_Parent_Theme

    • This reply was modified 8 years, 10 months ago by silverks.
    Thread Starter darkdragon001

    (@darkdragon001)

    I am using the new way of building child themes and experienced that it does not work the recommended way by enqueueing it in the child them.

    Than I had a look at my parent theme (Graphene) to see why it does not work the way WordPress suggests it and found this bug. In my initial post, you can find my suggested a fix for it!

    Did you try to build a child theme based on Graphene by following the guide in the link you posted? Then you will notice it does not work! Have a look at the generated HTML and you will notice that CHILD/style.css will be included twice!

    • This reply was modified 8 years, 10 months ago by darkdragon001.
    • This reply was modified 8 years, 10 months ago by darkdragon001.
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘BUG: Style path wrong for child themes’ is closed to new replies.