Title: is_child_theme
Published: April 25, 2014
Last modified: February 24, 2026

---

# is_child_theme(): bool

## In this article

 * [Return](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#changelog)
 * [User Contributed Notes](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#user-contributed-notes)

[ Back to top](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#wp--skip-link--target)

Whether a child theme is in use.

## 󠀁[Return](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#return)󠁿

 bool True if a child theme is in use, false otherwise.

## 󠀁[Source](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#source)󠁿

    ```php
    function is_child_theme() {
    	global $wp_stylesheet_path, $wp_template_path;

    	return $wp_stylesheet_path !== $wp_template_path;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/theme.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/6.9.4/src/wp-includes/theme.php#L163)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/6.9.4/src/wp-includes/theme.php#L163-L167)

## 󠀁[Related](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#related)󠁿

| Used by | Description | 
| [get_block_asset_url()](https://developer.wordpress.org/reference/functions/get_block_asset_url/)`wp-includes/blocks.php` |

Gets the URL to a block asset.

  | 
| [WP_Site_Health::get_test_theme_version()](https://developer.wordpress.org/reference/classes/wp_site_health/get_test_theme_version/)`wp-admin/includes/class-wp-site-health.php` |

Tests if themes are outdated, or unnecessary.

  | 
| [wp_get_active_and_valid_themes()](https://developer.wordpress.org/reference/functions/wp_get_active_and_valid_themes/)`wp-includes/load.php` |

Retrieves an array of active and valid themes.

  | 
| [WP_Customize_Manager::prepare_starter_content_attachments()](https://developer.wordpress.org/reference/classes/wp_customize_manager/prepare_starter_content_attachments/)`wp-includes/class-wp-customize-manager.php` |

Prepares starter content attachments.

  | 
| [get_editor_stylesheets()](https://developer.wordpress.org/reference/functions/get_editor_stylesheets/)`wp-includes/theme.php` |

Retrieves any registered editor stylesheet URLs.

  | 
| [validate_current_theme()](https://developer.wordpress.org/reference/functions/validate_current_theme/)`wp-includes/theme.php` |

Checks that the active theme has the required files.

  | 
| [locate_template()](https://developer.wordpress.org/reference/functions/locate_template/)`wp-includes/template.php` |

Retrieves the name of the highest priority template file that exists.

  | 
| [get_body_class()](https://developer.wordpress.org/reference/functions/get_body_class/)`wp-includes/post-template.php` |

Retrieves an array of the class names for the body element.

  |

[Show 3 more](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#)
[Show less](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#)

## 󠀁[Changelog](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#changelog)󠁿

| Version | Description | 
| [6.5.0](https://developer.wordpress.org/reference/since/6.5.0/) | Makes use of global template variables. | 
| [3.0.0](https://developer.wordpress.org/reference/since/3.0.0/) | Introduced. |

## 󠀁[User Contributed Notes](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#user-contributed-notes)󠁿

 1.  [Skip to note 2 content](https://developer.wordpress.org/reference/functions/is_child_theme/?output_format=md#comment-content-3209)
 2.   [timph](https://profiles.wordpress.org/timph/)  [  7 years ago  ](https://developer.wordpress.org/reference/functions/is_child_theme/#comment-3209)
 3. [You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_child_theme%2F%23comment-3209)
    Vote results for this note: 3[You must log in to vote on the helpfulness of this note](https://login.wordpress.org?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_child_theme%2F%23comment-3209)
 4. **WARNING**: This function uses the `TEMPLATEPATH` and `STYLESHEETPATH` constants
    internally. If calling from a plugin, such as during plugin activation, there’s
    a chance these will be undefined. It is better to use:
 5.     ```php
        get_template_directory() !== get_stylesheet_directory()
        ```
    
 6.  [Log in to add feedback](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_child_theme%2F%3Freplytocom%3D3209%23feedback-editor-3209)

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Ffunctions%2Fis_child_theme%2F)
before being able to contribute a note or feedback.