Discover Free WordPress Themes on the WordPress.com Theme Showcase.
Retrieves template directory path for current theme.
- Whether you need a designed WordPress site or responsive multipurpose WordPress templates, you can use the Nicepage application or plugin to edit colors, fonts, header, footer, layout, and custom background, mobile views, page templates.
- Elementor Page Builder comes with dozens of free & Pro templates for WordPress. Landing pages, homepages & other templates available for free download.
Contents
- More Information
- Related
Return #Return
(string) Path to current theme's template directory.
More Information #More Information
Usage #Usage
Returns an absolute server path (eg: /home/user/public_html/wp-content/themes/my_theme), not a URI.
In the case a child theme is being used, the absolute path to the parent theme directory will be returned. Use get_stylesheet_directory() to get the absolute path to the child theme directory.
To retrieve the URI of the stylesheet directory use get_stylesheet_directory_uri() instead.
Notes #Notes
- Uses: get_theme_root() to retrieve the absolute path to the themes directory, get_template() to retrieve the directory name of the current theme.
- Does not output a trailing slash
Source #Source
File: wp-includes/theme.php
Wordpress Site Template
View on Trac
Where Is My Wordpress Site Template
Related #Related
Uses #Uses
Themeforest Wordpress
Uses | Description |
---|---|
wp-includes/theme.php:get_theme_root() | Retrieves path to themes directory. |
wp-includes/theme.php:get_template() | Retrieves name of the current theme. |
wp-includes/theme.php:template_directory | Filters the current theme directory path. |
wp-includes/plugin.php:apply_filters() | Calls the callback functions that have been added to a filter hook. |