Viewing 5 replies - 1 through 5 (of 5 total)
  • KafleG

    (@kafleg)

    Try this method. If not work feel free to ask.
    Child theme developement
    Thanks

    Thread Starter wpuser155

    (@wpuser155)

    Thanks for the reply kafleg. I have tried both code options listed on the codex page (and on your psge as well) in my child themes function.php but my child style.css is still not getting loaded last. I have this working for my twentyeleven theme but not sure why the problem here.

    KafleG

    (@kafleg)

    Child theme CSS is properly enqueue in functions.php?

    Thread Starter wpuser155

    (@wpuser155)

    This is what I have:

    <?php
    function theme_enqueue_styles() {

    $parent_style = ‘parent-style’;

    wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘child-style’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array( $parent_style )
    );
    }
    add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
    ?>

    Moderator Kathryn Presner

    (@zoonini)

    Thanks for the reply kafleg. I have tried both code options listed on the codex page (and on your psge as well) in my child themes function.php but my child style.css is still not getting loaded last. I have this working for my twentyeleven theme but not sure why the problem here.

    Could you provide a link to your site running Penscratch so I can take a look?

    Could you confirm that your child theme’s functions filename is actually functions.php (with an “s”) and not function.php?

    Also, I’d suggest you remove the closing PHP tag on your function above, it’s not recommended to use one in functions.php.

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