• Resolved flippingcarssa

    (@flippingcarssa)


    Hi,

    I recently learned how to setup a child theme from a Youtube video. All the files seem to be matched correctly however When i try to do a CSS change in the child theme it does not reflect on the website leaving me to believe that it might not be linked correctly.

    Could i get some assistance with this please?

    I am trying to remove this spacing: https://ibb.co/N2svkfh

    The theme i am using is Twenty Seventeen.

    In the Child theme CSS Stylesheet i have the following:

    /*
    Theme Name: Twenty Seventeen
    Theme URI: https://wordpress.org/themes/twentyseventeen/
    Description: Twenty Seventeen Child theme
    Author: Sameer
    Author URI: https://wordpress.org/
    Template: twentyseventeen
    Version: 1.0.0
    */

    /* =Theme customization starts here
    ——————————————————- */

    In the Child theme functions.php i have the following:

    <?php
    function my_theme_enqueue_styles() {

    $parent_style = ‘twentyseventeen-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 ),
    wp_get_theme()->get(‘Version’)
    );
    }
    add_action( ‘wp_enqueue_scripts’, ‘my_theme_enqueue_styles’ );

    // Additional php code goes here

    ?>

    My site-info.php is working correctly if that helps with the trouble shooting 🙂

    Thanks for reading this….

    The page I need help with: [log in to see the link]

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

    (@sterndata)

    Volunteer Forum Moderator

    It looks to me like you copied the entire parent CSS into the child CSS. The child’s CSS files should contain only overrides/changes to the parent CSS.

    As a matter of good form, you should name the child theme something like “twentyseventeen child”. It appears you’re also using “Twenty Seventeen” as the child theme name.

    Thread Starter flippingcarssa

    (@flippingcarssa)

    oooo that’s how it works.

    Thank you Steve, For taking the time to guide me. Its working correctly now 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child theme is not reflecting changes made on the website’ is closed to new replies.