Support » Themes and Templates » Making Child theme to wok

  • Resolved SurendraRay

    (@surendraray)


    I created a child theme and it works. However I cannot change the child theme to work with adding new codes such as

    body {
    background: #fff;
    lint-height:1;
    }

    What am I missing?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator t-p

    (@t-p)

    Thread Starter SurendraRay

    (@surendraray)

    I had read it (codex.wordpress.org/Child_Themes). My problem is the added new lines in the Child Theme (body {…..)did not affect anything even if according to the parent theme it should have worked and changed the background color accordingly.

    Please help.

    Can you give us a link to your site?

    Thread Starter SurendraRay

    (@surendraray)

    Sure:

    It is community.knowledgegap.biz.

    Thanks.

    From what I can see on that site, the activated theme is Community — not a child theme of Community.

    Did you create a folder called community-child, and did you activate it?

    For a child theme to work, you need to call a style.css file that has some specific requirements (all described in https://codex.wordpress.org/Child_Themes ). The CSS file you’re calling, is not style.css but default.css.

    There is a style.css in the theme (at http://community.knowledgegap.biz/wp-content/themes/community/style.css) but this is the parent theme, it seems (once again, it does not have the requirements of a child theme style.css), and you’re not calling this file at all.

    Thread Starter SurendraRay

    (@surendraray)

    Thanks Senff. It has been fixed.

    Surendra

    Thread Starter SurendraRay

    (@surendraray)

    Oh, now I made a child theme using Twenty Fourteen as the parent. In the child theme I added the following code anticipating the back ground color will change to red but it did not:

    .custom-background
    {background-color: red;
    }

    May I get some help?

    On the same subject – how do I copy a .php file from parent to the child so that I can monkey around in the child theme?

    Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Making Child theme to wok’ is closed to new replies.