Title: Child theme without functions.php
Last modified: August 28, 2021

---

# Child theme without functions.php

 *  [fred6633](https://wordpress.org/support/users/fred6633/)
 * (@fred6633)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/child-theme-without-functions-php/)
 * Hello,
 * I created a child theme to Twenty twenty-one. I created style.css and functions.
   php. It worked. I then tested with commenting these lines out in functions.php:
 *     ```
       // enqueue parent styles
   
       //function ns_enqueue_styles() {
       //    wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
       //}
   
       //add_action( 'wp_enqueue_scripts', 'ns_enqueue_styles' );
       ```
   
 * It still works.
 * Why does all tutorials say that you must enqueue parent and child theme in functions.
   php? Is that no longer necessary in the latest WordPress 5.8?
 * Fred
    -  This topic was modified 4 years, 9 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Developing with WordPress
      topic

Viewing 1 replies (of 1 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/child-theme-without-functions-php/#post-14812826)
 * There are three core principles to parent/child theme logic in WordPress:
    1.
   functions.php files from both parent and child get executed during load, with
   one of child them first (this is little counter-intuitive so worth remembering).
 * 2. “Template directory” refers to parent theme and “stylesheet directory” refers
   to child theme. If no child theme is being used they are same and both refer 
   to single current theme.
 * 3. Each template file is first looked for in child theme, then in parent theme.
 * Be aware that your customization will be over-written the next time you upgrade
   your parent theme. For this reason, it is recommended creating a [Child Theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/).

Viewing 1 replies (of 1 total)

The topic ‘Child theme without functions.php’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/child-theme-without-functions-php/#post-14812826)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
