Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: Editing CSS in Twenty Seventeen Child Theme

Discussion in 'Misc WordPress Requests' started by Christopher Nawoichik, Feb 28, 2018.

  1. Christopher Nawoichik

    Guest

    Reply To: Editing CSS in Twenty Seventeen Child Theme, by Christopher Nawoichik

    I’ve been working with the custom CSS panel, but still cannot make changes from style.css. Style.css has nothing in it but the enqueuing code.

    I’m wondering: (1) Did I enque the child theme over properly? I used the updated code from the WordPress repository on properly enqueuing scripts, which says not to use the @import “hook”—which slows it down:

    function my_theme_enqueue_styles() {

    $parent_style = 'twentyseventeen-style'; // This is 'twentyseventeen-style' for the Twenty Seventeen theme.

    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 ),
    wp_get_theme()->get('Version')
    );
    }
    add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );

    *Also, (2) what about responsive CSS? Every time I try @media queries before the code—in both custom CSS panel and Style.css—it gives me error messages. Thus I am entering the rules in properly.

    Reply To: Editing CSS in Twenty Seventeen Child Theme
     
    #1

Share This Page

Monarch Social Sharing Plugin