• Hi Matthias,

    I have followed this guide to create a child theme: https://kinsta.com/blog/wordpress-child-theme/#create :

    <?php
    /* enqueue script for parent theme stylesheeet */
    function childtheme_parent_styles() {

    // enqueue style
    wp_enqueue_style( 'parent', get_template_directory_uri().'/style.css' );
    }
    add_action( 'wp_enqueue_scripts', 'childtheme_parent_styles');
    ?>

    I would like to change the background color of article.page and article.post html elements. I have specificed these in the child theme style.css:

    /*
    Theme Name: Sempress Child
    Theme URI: https://ww.wp.xz.cn/themes/sempress/
    Description: Sempress child theme
    Author: Ben
    Author URI: https://hoedlog.uk/
    Template: sempress
    Version: 1.0.0
    Text Domain: sempresschild
    */

    article.page,
    article.post,
    article.attachment {
    background-color: #333333;
    }

    This changes are not taking effect. Have I made some kind of error in enqueing the style sheet?

    • This topic was modified 1 year, 2 months ago by criafolen.

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

The topic ‘create child theme style.css’ is closed to new replies.