• Hi,

    A couple of weeks when I thought I must be half way through a steep steep learning curve, I managed to install 2011 theme and, somehow amid all the muddling, I somehow installed 2011 child theme.

    I started experimenting with CSS (until a couple weeks ago I’d never heard of the stuff) in my child theme.

    BUT I suspected that the child theme and the parent were not quite communicating properly.

    Today I took the bold step of cntr-x-ing all the code on the child theme and found that all the styling from my blog had disappeared.

    Is that confirmation that in fact the child and parent are not ‘one’ as they should be?

    In my precipitous understanding of it, with a blank style.css in the child theme, the parent’s CSS style should dictate the styling and the blog should conform to the parent style.css.

    Right?

    Upon closer inspection of the parent style.css sheet headings, I found there is no ” Template: twentyeleven ” line which the Codex says is required along with the theme name.

    Would it be OK to copy the lines in the header of my child theme with all the lines (including Theme name and Template) and paste them to the header of the parent style.css?

    Would that make the two work together as they’re meant to?

    Sorry for the long post!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Always make your custom CSS inside the child theme..
    Because when you update your theme it can wipe out your new modifications.. You could copy the main parent css inside the child.
    Not the other way.. Then modify the child..
    Or you can copy only the css that need to be modified.
    These CSS will be below this line of code:

    You should have this line inside the child theme on first line
    /*
    Theme Name: My Chile Theme Name
    Description: Child of ParentName
    Author: admin
    Template: parentname

    (optional values you can add: Theme URI, Author URI, Version)
    */

    #New_css_here {
    }

    ….

    Thread Starter Stu181

    (@stu181)

    Thanks Remax,

    I sort of understand that.

    A style.css in the child which only has the header lines you posted above and no code means the site uses all the style.css of the parent.

    In my case, no css code in the child style.css = no css formatting at all on the site.

    As though the site is ONLY using the child css but not the parent css.

    I think it may be because the parent style.css is missing the line
    Template: parentname which the codex says is required.

    I’m going to change the header of the parent theme to match exactly the header of the child and include all required lines.

    I’m going to change the header of the parent theme

    DO NOT DO THAT !

    You NEVER change a file in the parent theme. Not just a little bit, not sometimes, not on new moons, not ever. NEVER

    It is only child themes that need the Template line. This is what lets them work.

    And by the way there are only Parent and Child themes, there are no grand child themes.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    *Drinks more coffee, is fully awake now. 😉 *

    Editing the parent theme will cause you pain and suffering later on when the parent theme get’s updated and you lose all of your changes.

    I think it may be because the parent style.css is missing the line
    Template: parentname which the codex says is required.

    Likely. In the Codex example the @import url("../twentyfourteen/style.css"); line is commented out. Just like the Template part change twentyfourteen to the directory name of your parent theme.

    Can you share a link to your site so we can look at your child theme’s style.css file? If you need a Twenty Eleven child theme to start off with try the one at this link.

    http://quirm.net/themes/twenty-eleven-child/

    Thread Starter Stu181

    (@stu181)

    Ross and Jan,

    Thanks for the responses and sorry I got back late.

    @ross – further reading after I posted here confirms your warning.

    @jan – my site is http://www.sahha.org – I’d appreciate a knowledgeable look at what I’m doing.

    Sorry if this is a stupid question but are you able to see the style.css sheet and child/parent setup without being logged in?

    Thanks again Gents,

    S.

    Sorry if this is a stupid question but are you able to see the style.css sheet and child/parent setup without being logged in?

    We can see the style.css etc, we have to get this to have the webpage work. However the relationship between child/parent and details is not spelled out in detail.

    Suggest that you install a browser inspector like firebug, it shows you how your html is formed and how your css is working.

    Thread Starter Stu181

    (@stu181)

    I have that already and have been using it.
    Methinks I’m grasping the idea of child/parent.
    Thanks for your help guys.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Is my child theme in fact an orphan?’ is closed to new replies.