1. PROMO Subscribe our All Access Pass @ 75% OFF & access all our 16+ premium Divi extensions: Divi Block Pro, Carousel Toolkit, etc.LEARN MORE
Dismiss Notice
NEW Divi.Help Pro Carousel AI Toolkit - Magically turn your Divi design into carousel, simply by using our online toolkit. No plugins needed. Now it works with Divi 5 as well!Try our carousel AI toolkit
BEST Divi Block - A revolutionary drag & drop tool to easily mix & match 960+ premade blocks (Light & Dark) to kick start your Divi site design. Special module designs are included as well. Also newly added AI generator & color. Now it works with Divi 5 as well!
Learn More About Divi BlockFree Version ~ 340+ Free Blocks

Solved wp-content/themes/Divi-child - style.css not being loaded!

Discussion in 'Free Divi Community Forum' started by Dan Cook, Apr 7, 2021.

  1. Dan Cook

    Dan Cook New Member

    My style.css inside Divi-child theme is not being loaded.
    I have tried many variations offered in the link below https://stackoverflow.com/questions/39975520/wordpress-child-theme-style-css-not-working
    and the official offered in https://developer.wordpress.org/themes/advanced-topics/child-themes/ and none work.
    I have done this before with a different theme with success!

    This is the code in functions.php i am using for the purpose.
    I also looked for threads on this in this forum and did not pull any related info on it!

    I heard Divi does not require a child theme, like other themes do etc, but that's how I operate!
    Any light is truly appreciated!


    PHP:
    <?php

    /**

    * @author Divi Space

    * @copyright 2017

    */


    add_action'wp_enqueue_scripts''my_theme_enqueue_styles' );
    function 
    my_theme_enqueue_styles() {
      
    $parenthandle 'parent-style'// This is 'twentyfifteen-style' for the Twenty Fifteen theme.
      
    $theme wp_get_theme();
      
    wp_enqueue_style$parenthandleget_template_directory_uri() . '/style.css',
      array(),  
    // if the parent theme code has a dependency, copy it to here
      
    $theme->parent()->get('Version')
      );
      
    wp_enqueue_style'child-style'get_stylesheet_uri(),
      array( 
    $parenthandle ),
      
    $theme->get('Version'// this only works if you have Version in the style header
      
    );
    }
    add_action'wp_enqueue_scripts''my_theme_enqueue_styles' );

    ?>
     
    1. PRO MEMBER PERKS Divi Ultimate Archive Plugin - Tons of elegant premade sidebar styles to choose from for your Divi site:Learn More
  2. Kriszti

    Kriszti New Member

    Hi,

    I have the same problem. After refresh Divi to 4.9.7 and WP to 5.7.2 custom style.css isn't working anymore.
    In previous version (4.8) everything had been working fine.
    Any idea?
     
    1. PRO MEMBER PERKS Divi Ultimate Header Plugin - Add more varieties for your Divi header (12 premade styles) + menu hover effects:Learn More
  3. Divi.Help

    Divi.Help Administrator
    Staff Member

    If you're using SG Optimizer or any other cache plugin, try to disable theme & see if it works.