Parent and Child Themes

  • taryngal

    #6908

    Hi,

    I have been using the Graphene theme and it is great, but I do a few questions about using a child theme and have not been able to find the answers anywhere:

    1. I made a few small changes (e.g., adding a donate button in sidebar) to the style.css of my parent theme. I then created a child theme. Is this ok? All of the changes I originally made do show in my child theme, but want to make sure that there will be no issues since I made these changes in my parent theme. I read other posts about this being an issue, but it seems to be working fine for me.

    2. I have been making changes in my child theme and they have been working great, however, the changes are not showing in my parent theme. Is this what should be happening or should I see all changes in the parent?

    3. Now that I have a child theme, are there any changes that I should be making in the parent theme or can I make all changes (e.g., plugins, color changes, posts, etc.) in the child theme?

    Also, I am working on my site offline, so I can’t provide a link to the site.

    Thank you so much! If there is somewhere else that I can find these specific answers, please let me know, I just could not find them anywhere!!

    Mod

    Kenneth John Odle

    #36114
    Quote:
    I made a few small changes (e.g., adding a donate button in sidebar) to the style.css of my parent theme. I then created a child theme. Is this ok?

    Well, not really. You shouldn’t alter parent theme files. If you update the parent theme, those changes will be overwritten, which is the entire point of making a child theme. However, as you’ve included those changes in your child theme, you can upgrade without worrying, since all you will be upgrading is your parent theme.

    Quote:
    the changes are not showing in my parent theme. Is this what should be happening or should I see all changes in the parent?

    The child draws off the parent theme, not the other way around. You are seeing exactly what you should be seeing.

    Quote:
    3Now that I have a child theme, are there any changes that I should be making in the parent theme or can I make all changes (e.g., plugins, color changes, posts, etc.) in the child theme?

    Do not edit theme files. Again, this is what a child theme is for, so feel free to make as many changes as you would like to the child theme. (I have seen some sites with a child theme that are so altered I have to examine the source code to verify that they are, indeed, Graphene based.)

    It seems that everything is working for you exactly the way it should.

    The one danger to avoid is copying over the entire parent style sheet or functions file. You should only include those elements you intend to change.

    Quote:
    Also, I am working on my site offline, so I can’t provide a link to the site.

    I often do this when developing child themes. Very handy, and much faster than a slow wireless connection.

    taryngal

    #36115

    Great, thank you so much for your quick response. All of your responses are so helpful!!

    I have a question about copying over the entire parent style sheet or functions file…would I know if I did this?? Sorry if this is an obvious question, I am very new to all of this 🙂 I have just been adding each change to the bottom of the Graphene Child: Stylesheet (style.css). I created my child theme by downloading Prasanna’s Child Theme Template.

    Thanks again!!

    Mod

    Kenneth John Odle

    #36116
    Quote:
    would I know if I did this??

    Yes, you would, because the current Graphene style sheet is 2632 lines long. Most child theme stylesheets are much shorter—usually in the range of 50-250 lines, depending on how you write your css. The current Graphene function file is mostly just require statements, pulling in other functions files.

    Quote:
    I created my child theme by downloading Prasanna’s Child Theme Template.

    Always a good way to start! 🙂

    taryngal

    #36117

    Got it! Thanks again, this is so helpful!

    Admin

    Syahir Hakim

    #36118

    Hi taryngal,

    Please mark this topic as resolved if your original questions have been answered. You can always create new topics later on if you have new questions.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.