• Hi! Apologies if this is a very novice question, but I’m just getting started with WP. I’m using Optimizer (free) theme on my site and created a child theme. I saved the child directory in /themes, added style.css and functions.php. I was able to active the child theme in the WP dashboard, and everything looked the same (except that the background color on all the pages was different, but I was able to customize that using my theme). This suggested to me that the child theme was working, but then when I pasted some code into the style.css, nothing seemed to be happening. My style.css looks like this:

    */
    Theme Name: Amy's Child
    Description: Child theme for Optimizer (23/06/2016)
    Author: Amy
    Template: optimizer
    Version: 1.0.0
    */
    
    body.page-id-64 {
     background: #ffffff;
    }
    
    .blog .container > .row {
    background: white;
    }

    My functions.php is:

    <?php
    
    add_action( 'wp_enqueue_scripts', 'optimizer_enqueue_styles' );
    
    function optimizer_enqueue_styles() {
       wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
    }
    ?>

    Am I doing something wrong?

    Thanks so much in advance!

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.