• jack randall

    (@theotherlebowski)


    Howdy, I’ve been a WordPress user and site builder for some time now and wouldn’t consider myself a dunce when it comes to these kinds of things but for the life of me I cannot get a child theme to enqueue styles at all.

    I’ve tried pretty much every single permutation of enqueuing that everydeveloper on every forum I’ve visited has said, “do this, it will work” about and still nothing.

    I’ve done all the basics as per usual: create the folder, create the style.css file with the theme name and template theme name, created a separate functions.php to enqueue the style sheets and nothing.

    I’ve checked the <head> section to see if the stylesheet is being loaded first and not being allowed to overwrite but it’s not being loaded at all!

    Obviously I’ve been through this forum and all over google for the last 5 hours trying to resolve this before some wag says, “hey, there’s a search feature…”

    I’ve never had this issue before and for the life of me i can’t figure out why it’s doing this (or rather not doing this…).

    Any help you guys could offer would be gratefully received. Any questions will be answered as soon as I can.

    I’m not going to post my functions.php code as at the moment it’s empty awaiting new code to make it work!

    Jack.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Please post your child theme’s functions.php and the top of style.css on wpbin.io and put a link here.

    I would expect to see this at the top of functions.php

    <?php
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
    function my_theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }

    Hi,
    Which theme you are using currently and not working in child theme.

    Thread Starter jack randall

    (@theotherlebowski)

    I’ve tried a few themes now as I started with twenty seventeen and couldn’t get that to work. Currently trying the Minimum-Minimal theme.

    As mentioned in the original post, my functions.php is currently empty as I’ve been trying lots of permutations, starting with the code you’ve listed above…

    show us the first 10-20 lines of your child-theme’s style.css

    Thread Starter jack randall

    (@theotherlebowski)

    I’ve got the stylesheet showing in the head now but it’s showing before the parent stylesheet…

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Your functions.php and style.css, please.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress Child Theme not loading stylesheets at all’ is closed to new replies.