• Resolved Garry K

    (@garry-k)


    I’ve just created and activated a child theme and the background color is lost. So I fixed the color. I wanted to put the color into the child style.css file but I can’t find it.

    Where is the background color stored?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Did you try to add your own style for body in your style.css:

    body {
        background: #f5f5f5;
    }

    Please, let me know if this help.

    Regards

    Thread Starter Garry K

    (@garry-k)

    I tried that.

    Here’s the thing. I log into WordPress as administrator.
    I then go to background and set it to
    #dcc695
    for now call it tan

    It changes.

    I go into shell-lite_child\style.css and add
    body{
    background: #f5f5f5;
    }

    The color should change but it is still tan!

    Furthermore if I search the shell-lite\style.css there is no evidence of dcc695

    For a test to determine that my child style.css is being read I temporarily remove the line @import url(“../shell-lite/style.css”);
    The styling disappears as expected – so I know that the file is being read.

    I just have no idea where the color dcc695 is defined.

    I just tested with child theme in one of my local Shell Lite installations and adding style for body works for me.
    Could you provide url of your site so we can take a look?

    Also if you are adding style after the @import, the new style should be considered as the first rule.

    Thread Starter Garry K

    (@garry-k)

    Here is my child style.css

    /*
    Theme Name: shell-lite_child
    Theme URI: http: //cabmaker32.com/
    Description: This is a custom child theme I have created to make changes
    Author: Garry Kernan
    Author URI: http: //cabmaker32.com/
    Template: shell-lite
    Version: 0.1
    */

    @import url(“../shell-lite/style.css”);

    body {
    background:#f5f5f5;
    }

    You have inline CSS, probably from plugin right before </head> tag:

    <style type="text/css" id="custom-background-css">
    body.custom-background { background-color: #dcc695; }
    </style>

    You have to check from where those style is coming and to remove it. After that style from your child theme should be working properly.

    Thread Starter Garry K

    (@garry-k)

    Ok

    I had to clear the background color in the WordPress editor.
    Then the child style sheet worked and I have the color I need.

    I just started using child theme today – Luckily there were only 2 items that I lost when I updated the shell-lite theme.

    The other issue is the header image. I don’t want the shell image – I want the underlying text.

    If you want to remove the logo, go to Appearance => Header and click to “Remove Header Image” button. Now you should have “Site Title” from General Settings.

    Thread Starter Garry K

    (@garry-k)

    Thankyou – you have been very helpful. I have just about got the child theme the way I want it.

    I have done this and of course that works. But when I upgraded shell-lite I lost that setting and had to go back and do it again.

    I thought the whole purpose of Child theme is so you don’t loose customizations and settings.

    You’d think that this setting should be set somewhere.

    Shell Lite settings should be stored in database for this reason. Are you sure you haven’t changed something else due update process?

    I hope I was helpful ??

    Thread Starter Garry K

    (@garry-k)

    Ok then – that means I’m wasting my time trying to find this in one of the shell-lite files.

    I believe then I’ve got the child theme working.

    Next chore for me is to figure out how to build a test/staging area.
    Since I’m the only one working on this web site I think I can get away with a single test/staging area.

    I was thinking of creating a sub domain for testing purposes. I can then apply new updates for theme and plugins as well as add pages first in test area.

    If I’m going to have a test database – is there a way of having 2 shell-lite installs that point to separate databases?

    I think the best way to have your test environment is to have two separated WordPress installs with two databases(in fact WordPress can have more than one WP installs in one database, but I wouldn’t recommend this).
    The first one will be your test install where you can add/edit plugins, adjust settings, etc and when you are satisfied with your changes you will migrate those changes in your live site.
    Is that makes sense?

    Regards

    Thread Starter Garry K

    (@garry-k)

    Thanks – you have been a big help. this is now resolved

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Background color in Child theme’ is closed to new replies.