WordPress.org

Ready to get started?Download WordPress

Forums

Luminescence Lite
[resolved] I just can't get the hang of the child theme? (22 posts)

  1. TonyWilliams
    Member
    Posted 8 months ago #

    I do apologise for what appears to be a straightforward question but I just cannot get the hang of the use of the child theme :-(
    I have followed the instructions on your site and read the WordPress page on child themes and this is what I've done
    1. I have created a Luminescence Lite child folder in the themes folder and it shows in my list of installed themes as you suggested.
    2.I have copied the following from the style.css of the main theme
    body {
    padding:40px 0;
    -moz-font-smoothing: antialiased;
    -webkit-font-smoothing: antialiased;
    background: #1d2022 url('images/backgrounds/background1.jpg') 0 0 repeat fixed;
    color: #787c7f;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 100%;
    font-smoothing: antialiased;
    line-height: 1.375em;
    }

    3. I activated the child theme and pasted the above into the style.css of the child theme and changed
    font-family: Arial, Helvetica, sans-serif; to font-family: Georgia, serif; I may want to change other body style elements hence the reason I copied the whole body code.
    4. This changed the font in the child theme but when I then activated the main theme where all my design changes are eg colour background etc, the font is still the original?

    I realise that you recommend a knowledge of css files which I haven't got (and it's probably a bit late in the day for me to start learning that at my age) but having followed what I thought were clear and precise instructions I still don't get it? Can you help?
    I appreciate any help you can give me.
    Many thanks
    Tony

  2. fantasma98
    Member
    Posted 8 months ago #

    I TonyWilliams.

    I'm not sure I understand your question.

    You should not be make changes to the parent theme. If you have changes to be made, they should all be in a child theme. So all your design changes should go to your style.css in your child theme.

    Does this answer your question?

    By the way learning is a lifetime process, so, you can learn how to do CSS whenever you want and feel comfortable to, as, I think, anything that gives you pleasure

  3. Noone Here
    Member
    Posted 8 months ago #

    Hello!

    The main reason for using the child themes is the ability to customize the look of the theme. But if you make any changes in the original, or parent theme, then you will most likely loose all of your changes if you update the theme. This is why we recommend the usage of child themes. The point is, if you make any CSS customization, it will be only visible, if the child theme is activated, not the parent theme, and this is the proper way to use the child theme. You have to have the parent theme's files inside WordPress, but the child theme needs to be activated all the time for the customizations to appear. Is there any particular reason that you want the parent theme activated?

    If you have any modification requirements, just post them here, I am happy to help you!

    Greetings,
    Balint

  4. 3. I activated the child theme and pasted the above into the style.css of the child theme and changed

    Can you share a link to your site? Sometimes that will let others show quickly identify what/where the problem is.

  5. TonyWilliams
    Member
    Posted 8 months ago #

    @fantama98 I am not making changes to the parent theme, I've only made changes to the child theme css file? I thought that the changes to the child theme would be picked up by the parent theme?
    Tony

  6. TonyWilliams
    Member
    Posted 8 months ago #

    @Balint. As I mentioned in a previous reply, I'm not making any changes to the main theme, only the child theme. The reason I want the parent theme activated is that's where I've done all my customisation. Do I understand then, that I shouldn't use the parent theme at all, only the child theme? If that's the case, how do I get all my customisation I've made to the parent theme into my child theme? Do I have to do them all over again or is there some way of importing them?
    Tony

  7. TonyWilliams
    Member
    Posted 8 months ago #

    @Jan. Here's the link to the work I've done so far. I would just say that is a very, very, very rough first pass as I've really used it to try and understand how WordPress works so the text and page structure that's there will change dramatically once I've got an understanding of WordPress.
    http://www.wordpresstest.thecapitalpartnership.co.uk

    Thanks
    Tony

  8. Noone Here
    Member
    Posted 8 months ago #

    Dear Tony,

    Yes, you should make any changes only inside the child theme. Unfortunately I am unaware of any tool that could differentiate your changes from the parent's original state.

  9. fantasma98
    Member
    Posted 8 months ago #

    @TonyWilliams, no they are not picked up by parent theme. Child theme is the one that "picks up" parent theme's look and feel and allows you to change it at your will.

    Think of a chocolate cake that you've seen on a magazine. You liked the look of it, but you prefer it with sprinkles and an icing frosting. You copy the cake and you add all of those. That's what a child theme is.

  10. TonyWilliams
    Member
    Posted 8 months ago #

    Ok I think I'm getting it now, so I should have left the parent theme as it was and only worked on the child theme. So my question is still - is there a way I can import to the child theme all my customisation of the parent theme into the child theme or do I have to start all over again? :-(
    Thanks guys
    Tony

  11. fantasma98
    Member
    Posted 8 months ago #

    I'm affraid there is not a simple way of doing it.

    Don't you have a backup of only the styles that were changed?

    Otherwise, you could just simply copy all of the parent CSS styles to the child theme styles file.

    It's not a pretty solution, but it will prevent any loss, in case the theme gets updated...

  12. TonyWilliams
    Member
    Posted 8 months ago #

    So if I copy the content of the parent themes style.css file using Editor and then pasted into the style.css file of the child theme that should be it?

    I think that sounds easy enough, or am I'm oversimplifying it?

    I didn't realise that when the option is there to customise a theme, you were actually changing it's original style.css file :-(

    Would I be safe in deleting the parent theme after I've copied the style.css file and then reinstall it to get the original theme in case I want to use it again?

    Thanks for sticking with me
    Tony

  13. fantasma98
    Member
    Posted 8 months ago #

    No. Don't delete the parent theme! Ever! Child theme would still be relying on it and would have unexpected consequences.

    By copying the parent style, to the child theme style, you are assuring that the changes you made in the parent style file won't be deleted when the theme gets updated.

    But, have both files backed up before making any changes.

  14. TonyWilliams
    Member
    Posted 8 months ago #

    @fantasma98 Thanks for all that help. I'll have a go at what you have suggested (although probably tomorrow now) and get back if I have any problems.
    Thanks again
    Tony

  15. StyledThemes
    Member
    Theme Author

    Posted 8 months ago #

    Hi Tony... wow, lots of communications here. Anyway, when you install Luminescence Lite, in the theme files is a folder called "child-theme" and inside that is a child theme zip file. You would install that one as the child theme (which is already made for you) just like any theme install.

    Once you do that, you would activate it, but make sure the parent theme is installed, although it doesn't have to be activated because the child theme will be the one active. What happens is that this child theme inherits the functions and styles of the parent theme (Luminescence Lite). The child theme then allows you to make modifications to most of the parent theme files, for example, the style.css.

    When you want to make a change to something from the parent theme, you would create new css in the child theme's style.css. So for example, if you wanted to change the font of a heading, you would add your own css. The styling for the headings is on line 549 in the parent theme's style.css and looks like this:

    h1, h2, h3, h4, h5, h6 {
    font: normal 24px merienda, sans-serif;
    }

    So what you would do is copy that (and only what you plan to change) into your child theme's style.css file and then make your change like this:

    h1, h2, h3, h4, h5, h6 {
    font: normal 22px Helvetica, Arial, sans-serif;
    }

    Also, if you wanted to change something in a file like the header.php file of the parent theme, you would copy that file and paste it into your child theme and then make whatever changes you need to do.

    Then whenever there is a Luminescence Lite update, your custom changes won't be lost because it's the parent theme that gets updated, not the child theme.

    Hope that helps :)

  16. TonyWilliams
    Member
    Posted 8 months ago #

    Yes there are a lot of communications - evidence, I'm afraid to say, of my misunderstanding of child themes. None of my "Beginners guides to WordPress" mention child themes but suggest that you activate a theme and then happily go and change the content using the dashboard options for customisation. I think this is a big gap in the beginner's books. And I think this is where I misunderstood. I hadn't grasped the difference between "customisation" and changing the css file. I suspect that what I should have done was to create the child theme first before I started on my site and then customised the child not the parent. Is that correct?

    Anyway I am where I am now so I need to understand my options. I have created the child theme folder. Should I leave this as a subfolder of the main parent folder or should I move it as a subfolder in themes? This isn't clear from the support pages I've read on the WordPress site. If I leave it as a subfolder of the parent, will it appear in the list of installed themes? I assume that the child theme doesn't pick up the customisation I've already made to the parent?

    I see from your last post that I only need to copy the elements of the style.css file that I want to change not the whole of the parent style.css file which s a question I asked earlier.

    You say in your post:

    Also, if you wanted to change something in a file like the header.php file of the parent theme, you would copy that file and paste it into your child theme and then make whatever changes you need to do.

    What changes would this allow me to make apart from the header font style which presumably I would do in the style.css file?

    I do appreciate that this is turning into a master class on WordPress Child Themes and I apologise if I am expecting too much in the way of "free" support. However I am really grateful for all the help that guys in this forum are providing, it is an incredible resource for beginners like me.

    When I retired, some 15 years ago, I decided to teach myself how to build websites, just to stop my brain from going to sleep. In those days there was predominantly only HTML editors so I taught myself HTML. I then graduated to using the WYSIWYG software, in my case Serif's WebPlus, which made the job a lot easier. So WordPress and its use of themes, php and css files is completely new to me. I have been asked by a friend to build a site for a club where a number of people can access pages of the site and update them remotely. WordPress seemed to be the obvious answer as WebPlus is not really designed for that purpose.

    BUT, I'm getting there, much slower than if I wasn't 69, but I'm getting there and that's what counts!

    Again I'm really grateful for yours and everyone else help and stress that when I overstep the line in terms of the things I expect, someone must tell me.

    Again many thanks
    Tony

  17. esmi
    Forum Moderator
    Posted 8 months ago #

    Should I leave this as a subfolder of the main parent folder or should I move it as a subfolder in themes?

    Your child theme should have its own folder in wp-content/themes - just like any other theme. The big difference with a child theme is that you must keep the parent theme installed.

    I assume that the child theme doesn't pick up the customisation I've already made to the parent?

    Yes it will but, longer term, you may want to move those customisations over into the child theme and then restore the parent to its original forum.

    What changes would this allow me to make apart from the header font style which presumably I would do in the style.css file?

    In theory, pretty much any change you might want - from minor style/formatting changes to radical ones such as completely re-writing a header etc.

    when I overstep the line in terms of the things I expect, someone must tell me.

    We are more than happy to support you as you get to grips with WordPress theming and usage. That's exactly what these forums are for. All that we do sometimes ask is that you create a new topic for a new question, so that future forum searchers can find solutions to their problems easier. Other than that, please ask away. :-)

  18. TonyWilliams
    Member
    Posted 8 months ago #

    @esmi many thanks for your reply and your support. I will plough on!
    Tony

  19. StyledThemes
    Member
    Theme Author

    Posted 8 months ago #

    Hi Tony... I wanted to follow up to see how you are making out with the child theme?

    Depending on what kind of changes a person wants to do, there is a bit of a learning curve when it comes to using a child theme because it does require some hands on html and css coding basics...and of course, lots of time to read up on using child themes, in general.

  20. TonyWilliams
    Member
    Posted 8 months ago #

    Hi there, thanks for your concern.

    I think I'm beginning to grasp the concept now. I only wish I'd known about it before I started having spent time customising the original (the customisation doesn't appear to flow through to the child as suggested by esmi in a previous post) so I need to start again with the child.

    As far as hands on with html, that's no problem as I mentioned I have a reasonable knowledge of html, it's the css file where I'm floundering. Given the somewhat short time scale I have, I may find it difficult to get a sound knowledge of css to enable me to edit the theme in the way that my friend wants in the time I have. BUT, I'm never one to give up and so I'll keep trying.

    Many, many thanks for your support it has certainly helped.
    Regards
    Tony

  21. StyledThemes
    Member
    Theme Author

    Posted 8 months ago #

    No worries... and yes, that is the unfortunate part of switching to a child theme is that theme options often have to be redone.

    Anyway, is it safe to say this topic can be closed as resolved, or do you have more questions relating to this topic?

  22. TonyWilliams
    Member
    Posted 8 months ago #

    Hi there, sorry for the delay. Yes I think I'm OK now with the concept, I just need to get down to understanding the code structure of css files.
    Once again many thanks for all you're hrlp and I have now marked this topic as resoled.

    Regards
    Tony

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.