• Hello,

    I am trying to make a child theme for a site. The css stylesheet is not loading, leaving me with a blank white screen. Help! At this point, I just want to pull in the parent theme’s css (or ANY css for that matter!)

    Thanks in advance!

    My CSS:

    /*
     Theme Name:   Rios Property Group
     Theme URI:    http://riospropertygroup.com/
     Description:  Rios Property Group
     Author:       Angelina Marie
     Author URI:   http://angelina-marie.com/
     Template:      Rios_Prop_Group
     Version:      1.0.0
    */

    Functions.php:

    <?php
    add_action( 'wp_enqueue_scripts', 'load_my_styles' );
    function load_my_styles() {
        wp_enqueue_style( 'Rios_Prop_Group', get_template_directory_uri() . '../style.css' );
    }

Viewing 12 replies - 1 through 12 (of 12 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Use get_stylesheet_uri()

    Thread Starter ambethoney

    (@ambethoney)

    Do you mean switch out get_template_directory for get_stylesheet_uri?I’ve tried that to no avail.

    I also tried get_stylesheet_uri separately, and I still just have a blank white screen. Looking at the DOM, it is not calling any stylesheets at all. I’m not sure as to why!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Do you mean switch out get_template_directory for get_stylesheet_uri?

    Yes but also take off your “..”

    Thread Starter ambethoney

    (@ambethoney)

    I did that. My screen is still blank. The website is riospropertygroup.com. My files are lined up correctly, as in:

    wordpress-content>
    themes>
    Rios_Prop_Group
    Rios_Prop_Group_Child

    I am at a loss as to why nothing is showing.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What’s in your entire child theme functions.php file?

    Thread Starter ambethoney

    (@ambethoney)

    <?php
    add_action( 'wp_enqueue_scripts', 'load_my_styles' );
    function load_my_styles() {
        wp_enqueue_style( 'Rios_Prop_Group', get_stylesheet_uri(). '/style.css' );
    }
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Put a closing PHP tag on the end of the file just in case

    Thread Starter ambethoney

    (@ambethoney)

    Still nothing.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Does the website show at all when there is no functions.php file in your child theme?

    Thread Starter ambethoney

    (@ambethoney)

    No.

    I bought a template off of theme forest. I just tried to use the original parent template as my theme, and that is also coming across blank. I would imagine that if my parent theme isn’t working, neither would my child theme.

    So I guess that leaves me with this: Why doesn’t the parent theme work? Ugh!

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Have you spoken to your theme author about this?

    Thread Starter ambethoney

    (@ambethoney)

    No, that will be my next step. I just moved all files out of the WP folder to start fresh. I re-downloaded the theme I purchased and tried to activate it. I’m receiving this error:

    Broken Themes

    The following themes are installed but incomplete. Themes must have a stylesheet and a template.

    Name Description
    www/css Template is missing.

    I moved the stylesheet from the css folder into the main theme folder, and was greeted with:

    Broken Themes

    The following themes are installed but incomplete. Themes must have a stylesheet and a template.

    Name Description
    www Template is missing.

    This is an error on the theme author, correct? I just want to make sure I didn’t do anything wrong…

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Child Theme Not Loading CSS’ is closed to new replies.