• Resolved rajeevthomas

    (@rajeevthomas)


    Hello, I am new to Virtue theme and WP. I am trying to put together a site and created a child theme for it. Here is the link to the site my site My child theme css is not over writing the theme option styles though I used !important clause in the style. I am trying to change the .headerclass color to black ( this is just an example..) What am I doing wrong? Here is what I have in the CSS file `/*
    Theme Name: SCMP – Child
    Theme URI: https://www.statecollegemoments.com/virtue/
    Description: Child theme for SCMP
    Author: SCMP
    Author URI: https://www.kadencethemes.com/
    Template: virtue
    Version: 1.0.0
    */
    .headerclass {
    color:#000 !important;
    }`

    and in the functions.php I have

    //Add your custom functions here.
     add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/virtue.css' );
        wp_enqueue_style( 'child-style',
            get_stylesheet_directory_uri() . '/virtue.css',
            array('parent-style')
        );
    }

    Thank you for your help…

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey,
    You don’t need the function you’ve added. Theme already does all that, not to mention yours isn’t set up correctly.

    If your wanting to change the header background then you would use css like this:

    .headerclass {
    background:#000 !important;
    }

    Chancing the headerclass color doesn’t really make sense. If you want to change the text color of something in the header like the menu then you would need to me more specific with your css.

    Hope that helps,

    Kadence Themes

    Thread Starter rajeevthomas

    (@rajeevthomas)

    Thank you so much! I feel very intelligent now! ?? Sorry if none of it made sense! I am a newbie and I don’t know what the heck I am doing! ?? I feel like a fool for using color instead of background! Duh! Thanks again… I was just trying to get the colors complimentary and the black color was just an example used here. I was just surprised why it was changing the color now I know I should have used background! Thanks again! BTW.. your theme is amazing… I will purchase the premium theme next month or so.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Child theme not over riding theme option syles’ is closed to new replies.