Title: Create Child Theme
Last modified: August 22, 2016

---

# Create Child Theme

 *  [GottiRhg](https://wordpress.org/support/users/gottirhg/)
 * (@gottirhg)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/create-child-theme-2/)
 * Hello,
    i use the flat theme for my blog. Now i want to create a child theme.
   Which files need to be imported in the child folder?
 * Thanks!

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Luke Stacey](https://wordpress.org/support/users/daftduke/)
 * (@daftduke)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/create-child-theme-2/#post-5404914)
 * Hi there!
 * You can read about child themes at the WordPress Codex [here](http://codex.wordpress.org/Child_Themes).
 * You don’t necessarily have to copy any files, it depends on what you are trying
   to achieve. For basic CSS customizations you don’t need to copy any thing, just
   create two new ones:
 * 1. style.css
 * Paste in this code (modify as necessary):
 *     ```
       /*
        Theme Name:   Flat
        Theme URI:    http://example.com/flat/
        Description:  Flat Child Theme
        Author:       John Doe
        Author URI:   http://example.com
        Template:     flat
        Version:      1.0.0
        Tags:         flat
        Text Domain:  flat-child
       */
   
       /* =Theme customization starts here
       -------------------------------------------------------------- */
       ```
   
 * 2. functions.php
 * Paste in this code:
 *     ```
       <?php
   
       add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
       function enqueue_child_theme_styles() {
           wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
           wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style')  );
       }
       ```
   
 * Then go to Appearance -> Themes and activate your new child theme. You can paste
   any CSS into your style.css file.
 * I hope that helps!
 * Luke the Daft Duke
 *  [AtillaBoz](https://wordpress.org/support/users/atillaboz/)
 * (@atillaboz)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/create-child-theme-2/#post-5404968)
 * Hello Luke,
 * thanks for your post. It came just in time 🙂 I just did what you said and it
   worked well. I made a new folder called “flat-child” and added those 2 files 
   you mentions and a few changes like this in the style.css file:
 *     ```
       /*
        Theme Name:   Flat
        Theme URI:    http://example.com/flat/
        Description:  Flat Child Theme
        Author:       John Doe
        Author URI:   http://example.com
        Template:     flat
        Version:      1.0.0
        Tags:         flat
        Text Domain:  flat-child
       */
   
       /* =Theme customization starts here
       -------------------------------------------------------------- */
   
       /* Header - Untertitel - Schriftfarbe */
       #masthead .site-description, .hentry .entry-meta {
           color: #fff;
       }
   
       /* Widget - Überschriften - Textfarbe */
       #secondary .widget-title {
           color: #fff;
       }
   
       /* Widget - Linkbox - Textfarbe */
       #site-navigation .current-menu-item > a, #site-navigation
       .current-menu-parent > a, #site-navigation
       .current-menu-ancestor > a, #site-navigation
       .current_page_item > a, #site-navigation
       .current_page_parent > a, #site-navigation
       .current_page_ancestor > a {
           color: #fff;
       }
   
       /* Footer - Seitenzahlen - Hintergrundfarbe */
       .paging-navigation .page-numbers {
           background-color: #ff7e00;
           border-color: #000;
       }
   
       /* Footer - Seitenzahlen - Hintergrundfarbe, HOVER */
       .paging-navigation .page-numbers:hover {
           background-color: #2c486f;
           border-color: #fff;
       }
       ```
   
 * I just wonder why it was so easy 😀 I mean how did the child theme found out 
   which one is the parent theme? And why is the child theme also named “Flat” and
   not “Flat Child”
 * I could not see anything in the functions.php that defines which parent theme
   to chose.
 * And how do I add a thumbnail to the child theme. I often make websites for customers
   and it`s always a pain if there`s a design update…
 * Thanks again for everything,
    Atilla
 *  [stephencottontail](https://wordpress.org/support/users/stephencottontail/)
 * (@stephencottontail)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/create-child-theme-2/#post-5404969)
 * That’s determined by the comments at the start of the file: “Theme Name:” determines
   the name of theme as displayed by WordPress. “Template:” tells WordPress what
   the parent theme is. To display a thumbnail, make a file named `screenshot.png`
   and put it in the child theme’s folder.
 *  Thread Starter [GottiRhg](https://wordpress.org/support/users/gottirhg/)
 * (@gottirhg)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/create-child-theme-2/#post-5404977)
 * Thanks for your answers. I hadn’t edit the functions.php like this yet. Now it
   works fine!
 *  [robtbm](https://wordpress.org/support/users/robtbm/)
 * (@robtbm)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/create-child-theme-2/#post-5405153)
 * Hi, I seem to have a problem with the child them css loading twice. I have added
   the code mentioned above to the childs functions.php
 *     ```
       <?php
   
       add_action( 'wp_enqueue_scripts', 'enqueue_child_theme_styles', PHP_INT_MAX);
       function enqueue_child_theme_styles() {
           wp_enqueue_style( 'parent-style', get_template_directory_uri().'/style.css' );
           wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style')  );
       }
       ```
   
 *     ```
       <link rel='stylesheet' id='flat-style-css'  href='http://www.site.com/blog/wp-content/themes/flat-child/style.css?ver=1.5.5' type='text/css' media='all' />
       <link rel='stylesheet' id='parent-style-css'  href='http://www.site.com/blog/wp-content/themes/flat/style.css?ver=4.1' type='text/css' media='all' />
       <link rel='stylesheet' id='child-style-css'  href='http://www.site.com/blog/wp-content/themes/flat-child/style.css?ver=4.1' type='text/css' media='all' />
       ```
   
 *  [Andrew Nevins](https://wordpress.org/support/users/anevins/)
 * (@anevins)
 * WCLDN 2018 Contributor | Volunteer support
 * [11 years, 2 months ago](https://wordpress.org/support/topic/create-child-theme-2/#post-5405154)
 * Probably best to create a new thread [https://wordpress.org/support/theme/flat#postform](https://wordpress.org/support/theme/flat#postform)
 *  [YoArts](https://wordpress.org/support/users/yoarts/)
 * (@yoarts)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/create-child-theme-2/#post-5405155)
 * I have loaded main stylesheet again on the Flat 1.5.7.
    Now you just need to 
   create a `style.css` file on the child theme. And it will automation loaded on
   the site.
 * Regards,
    Thanh Luu

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Create Child Theme’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/flat/1.7.11/screenshot.png)
 * Flat
 * [Support Threads](https://wordpress.org/support/theme/flat/)
 * [Active Topics](https://wordpress.org/support/theme/flat/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/flat/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/flat/reviews/)

## Tags

 * [child](https://wordpress.org/support/topic-tag/child/)

 * 7 replies
 * 7 participants
 * Last reply from: [YoArts](https://wordpress.org/support/users/yoarts/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/create-child-theme-2/#post-5405155)
 * Status: not resolved