Tutorial: How to create a child theme
  • In order to create a child theme for the theme you need to create a new folder in the /themes/ directory of wordpress and place a new style.css file to register your child theme to your wordpress installation.

    For example;

    - Create a new folder like /rttheme17-child
    - then create a new file as style.css


    /*
    Theme Name: RT-Theme 17 Child
    Description: Child theme for RT-Theme 17
    Author: Tolga Can
    Template: rttheme17
    */


    Double check the "Template: rttheme17" line of the code it must referring the same folder name of main theme.

    Once you activated the new child theme from WP admin -> Appearence -> Themes, you can now start playing with the css files by copying selectors from the original theme css file (/css/style.css)

    For example;

    In order to change background color and default font size of the body text your new css file could be look like this



    /*
    Theme Name: RT-Theme 17 Child
    Description: Child theme for RT-Theme 17
    Author: Tolga Can
    Template: rttheme17
    */


    /* body */
    body {
    font-size:15px;
    line-height:30px;
    background:#FFBDAF;
    }




    Please remember, if you changed any color,size, font via Styling or Typography options, that selected value will be overwrite your child-theme css files as well.

    -
    Tolga
This discussion has been closed.
All Discussions