• i keep seeing a reference to child theme and making one- can some explain please and the relevance of it?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    What have you heard so far?

    Have you reviewed Child Themes?

    Thread Starter remmil

    (@remmil)

    nothing – just keep seeing it mentioned

    A child theme will let you use all of the good stuff from a theme you like but dont want to use (i.e. its layouts, design and other features) so that you can have your very own theme without losing the changes if the parent (the theme you like but dont want to use) gets an update.
    here is how to create a child theme in its most simple form

    first right click on your desktop (on your computer) and select new folder. Name the folder “name-of-your-new-theme-child” and then open it up.

    inside the new folder right click once more and select new text document and name it style.css and save that. Once you have the style.css created, simply paste the following code into it. Here goes.

    /*
    Theme Name:     Your theme name Child
    Theme URI:      http://example.com/
    Description:    Child theme for the whatever theme
    Author:         Your name here
    Author URI:     http://example.com/about/
    Template:       The Name of the parent theme
    Version:        0.1.0
    */
    
    @import url("../the parent theme/style.css");
    
    .some-style {
        background: url("images/green-sep.png") repeat-x scroll 0 0 #71963C;
        border-bottom: 1px solid #47621F;
    }

    Now save that file and close it.
    Now you can simply take this folder and upload it to your themes directory. You must keep the Original Parent theme in there as this child theme will be riding on the back of its parent theme.
    Now once you have it in your theme directory, simply log into your admin panel and go to themes and activate the child theme. When you wish to change something again, simply open the child theme and do your work there.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘child theme’ is closed to new replies.