• I am developing a new website under WordPress on my home laptop under XAMPP v3.2.2 at Local Host, everything is working fine except that any CSS changes in the Child Theme created do not show up on the website either in the preview before activating or on the actual site after activation, site displays as created in Twentyten when activated via Child Theme!

    Theme is Twentyten, Child Theme Twentytenchild. BBpress plugin activated (no others yet)

    The files:-
    style.css in twentytenchild folder (just one change for testing purposes)

    /*
    Save in /wp-content/themes/twentytenchild/style.css
    Theme Name: Twenyten Child Theme
    Theme URI: http://www.wpbeginner.com/
    Description: A Twenty ten child theme
    Author: WPBeginner
    Author URI: http://www.wpbeginner.com
    Template: twentyten
    Version: 1.0.0
    */

    /*
    @import url(“../twentyten/style.css”);
    */

    background: red;

    functions.php in twentytenchild folder (no closing statement?)

    <?php

    function twentytenchild_enqueue_styles() {

    $parent_style = ‘twentyten’;

    wp_enqueue_style( $parent_style, get_template_directory_uri() . ‘/style.css’ );
    wp_enqueue_style( ‘twentytenchild’,
    get_stylesheet_directory_uri() . ‘/style.css’,
    array( $parent_style )
    );
    }

    add_action( ‘wp_enqueue_scripts’, ‘twentytenchild_enqueue_styles’ );

    I note that there are numerous suggestions on line regarding what code to enter in the function.php file to ‘enqueue’ the necessary files, what changes necessary to accommodate any particular theme and child is less clear. I finally found this thread which was more explanatory for those of us that ‘just know enough to be dangerous!’ https://wordpress.org/support/topic/child-theme-not-working-for-a-change/. This suggestion specifically calls for no closing tag whilst most others do? If you make other suggestions to this file please be specific on this point. The various discussions as to the use of this method are all gobbledegok to me!
    I also note that I have tried the old ‘import’ method (with and without the php file) and the php file without the ‘import’ line in the css file all without success.
    I also note that changes directly to the main theme via both dashboard and css edits show up fine as do changes made to a copy of same renamed 2010custom. I have deleted both history and cache in my browser (firefox) used ctrl f5 to refresh and also looked at it in IE with no avail.
    Anyone got any idea what to do next? Please note that my knowledge of CSS and PHP is very rudimentary

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

The topic ‘Child theme not working’ is closed to new replies.