• Resolved TonyWilliams

    (@tonywilliams)


    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

Viewing 15 replies - 1 through 15 (of 21 total)
  • 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

    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

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    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.

    Thread Starter TonyWilliams

    (@tonywilliams)

    @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

    Thread Starter TonyWilliams

    (@tonywilliams)

    @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

    Thread Starter TonyWilliams

    (@tonywilliams)

    @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.
    https://www.wordpresstest.thecapitalpartnership.co.uk

    Thanks
    Tony

    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.

    @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.

    Thread Starter TonyWilliams

    (@tonywilliams)

    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

    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…

    Thread Starter TonyWilliams

    (@tonywilliams)

    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

    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.

    Thread Starter TonyWilliams

    (@tonywilliams)

    @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

    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 ??

    Thread Starter TonyWilliams

    (@tonywilliams)

    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

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘I just can't get the hang of the child theme?’ is closed to new replies.