WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Making Child theme to wok (8 posts)

  1. SurendraRay
    Member
    Posted 4 months ago #

    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?

  2. Tara
    Member
    Posted 4 months ago #

  3. SurendraRay
    Member
    Posted 4 months ago #

    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.

  4. Senff
    Member
    Posted 4 months ago #

    Can you give us a link to your site?

  5. SurendraRay
    Member
    Posted 4 months ago #

    Sure:

    It is community.knowledgegap.biz.

    Thanks.

  6. Senff
    Member
    Posted 4 months ago #

    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.

  7. SurendraRay
    Member
    Posted 4 months ago #

    Thanks Senff. It has been fixed.

    Surendra

  8. SurendraRay
    Member
    Posted 4 months ago #

    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.

Reply

You must log in to post.

About this Topic