• I’m trying to make a few ajustments to Glossy Stylo, but I can’t seem to get the child theme to work. Whatever styles I apply in the new style sheet (in the child directory).

    The child style.css looks like this:

    /*
    Theme Name: glossy-child
    Template: glossy-stylo
    */
    @import url(“../glossy-stylo/style.css”);
    h1, h2, h3 {color:#FF0000;}

Viewing 10 replies - 1 through 10 (of 10 total)
  • I’m using a child-theme successfully using this at top of my child style.css
    /*
    Theme Name: Glossy Stylo Child
    Description: Child theme for the Glossy Stylo theme
    Template: glossy-stylo
    Version: 0.1.0
    */
    /* import parent theme style */
    @import url(“../glossy-stylo/style.css”);

    IAmTam

    (@iamtam)

    I am having the same problem. I have what psurch has for my child theme header. It’s not that the child theme overall is not working. It’s that the child style sheet will not over ride the original style sheet. If anyone finds a solution, let us know.

    WPyogi

    (@wpyogi)

    @iamtam – there’s no way to help with CSS questions without seeing your actual site.

    IAmTam

    (@iamtam)

    Quick response! Thank you.

    I tried to change the original style sheet too but it did not work.

    Here is my site:
    https://ohholynightlyrics.com/

    I was just trying to change the font for the site title and description.

    WPyogi

    (@wpyogi)

    For sure, don’t modify theme files – as your changes will be lost when the theme is updated. Right now, you don’t have a child theme active on your site – did you activate it? If you only want to make CSS changes you could use a Custom CSS plugin. Then try adding this CSS – and change the font to what you want:

    #header h1 {
        font-family: arial;
    }
    
    #headerimg .description {
        font-family: arial;
    }

    Be sure to clear your browser cache after making any changes.

    IAmTam

    (@iamtam)

    Yes, under “theme” it shows my current theme as “Glossy Stylo-Child.” Although I don’t remember activating it. It just automatically happened after I uploaded my child theme file to my server. Hum. I’m not sure what’s going on but it is probably something simple that I’m not seeing.

    Thank you for your help.

    IAmTam

    (@iamtam)

    I am going to try activating a different theme, and then re-activate the child theme and see if that works.

    IAmTam

    (@iamtam)

    Sorry to post again…I double checked everything. Everything looks right but my child theme style.css file is not overriding the parent theme’s style.css file.

    I have this at the top of my child style sheet:

    /*
    Theme Name: Glossy Stylo Child
    Description: Child theme for the Glossy Stylo theme
    Template: glossy-stylo
    Version: 0.1.0
    */
    
    /* import parent theme style */
    @import url("../glossy-stylo/style.css");

    Can you see any mistakes?

    When I use Firebug, I can make the (temporary) changes. But I just can’t make them stick.

    Again, thank you for your help!

    psurch

    (@psurch)

    1. Make sure your folder structure is correct.
    themes
    > glossy-stylo
    > glossy-stylo-child
    2. Make sure your child theme is activated as your main theme
    3. When you load the site you’ll notice your style sheet is loading from the parent theme not the child theme.
    href=”https://ohholynightlyrics.com/wp-content/themes/glossy-stylo/style.css?ver=3.7.1″
    It should be
    href=”https://ohholynightlyrics.com/wp-content/themes/glossy-stylo-child/style.css?ver=3.7.1″

    endellion

    (@endellion)

    I think I found a solution to this. In the “functions.php” is a section

    `/**
    * Load the style.css
    */

    add_action('wp_enqueue_scripts', 'mythemeprefix_styles');

    function mythemeprefix_styles(){
    wp_enqueue_style( 'css', get_template_directory_uri()() . '/style.css' );
    }`

    I changed get_template_directory_uri() to get_stylesheet_directory() and now it seems to be working correctly for me.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Child theme not working’ is closed to new replies.