• Resolved alondonb

    (@alondonb)


    Hi all,
    I am at my wit’s end! Cannot get my child theme CSS sheet to show and have tried:

    @import
    functions.php
    !important

    but nothing happens. I know CSS does work because I used a plugin and it rendered fine. I have the style sheet in a child theme folder, no subfolders. All named correctly.

    Can someone take a look? Thank you so much in advance.

    /////////////////

    Here is the top of my css stylesheet:

    /*
    Theme Name: Button Child
    Description: Customizations to Button Theme
    Author: Pyrite Pixels
    Author URI:
    Template: button
    Version: 1.0
    */
    /* NOTES
    Original accent color from another: #24890d
    */

    p {
    color: #40ba37 !important;
    }

    Here is the functions.php file:
    <?php
    /**
    * button-child functions and definitions
    *
    * @package button
    */
    /*
    When transferring, Plugin Name: Site Plugin for mysite.com
    Description: Site specific code changes for mysite.com
    */
    /* Start Adding Functions Below this Line */

    function my_theme_enqueue_styles() {

    $parent_style = ‘parent-style’; // This is ‘twentyfifteen-style’ for the Twenty Fifteen 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’ );

    /* Stop Adding Functions Below this Line */
    ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter alondonb

    (@alondonb)

    Wow, something is really weird. Finally the green started showing up. Then I removed it to test it, and even Force refreshing the browser it is still showing green.

    Any idea why it isn’t changing back now?

    Thread Starter alondonb

    (@alondonb)

    And then I added other things to the child css style sheet and it still isn’t showing up, and the green text font which doesn’t exist anywhere is still showing.

    Please I really hope someone can help. Thank you.

    Thread Starter alondonb

    (@alondonb)

    I found it!

    The error was that my server had a Caching tool enabled. Once I disabled that, the child styles.css started showing up fine.

    New hosting company, had no idea that could be an issue there.

    Moderator Kathryn Presner

    (@zoonini)

    Glad you figured it out! I’ll mark this thread as resolved but feel free to start a new one if you need help with anything else.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Child Theme CSS Not Working Parent Still Showing’ is closed to new replies.