- 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細)
関数リファレンス/get template
目次
Description
Retrieves the directory name of the current theme, without the trailing slash.
In the case a child theme is being used, the directory name of the parent theme will be returned. Use get_stylesheet() to get the directory name of the child theme.
Usage
<?php get_template() ?>
Parameters
This tag has no parameters.
Return Values
- (string)
- Directory name of the current theme (without the trailing slash). Its the same as the name of the theme..
Examples
For example, if your current active theme is named 'heli', then:
<?php echo get_template() ?>
will output
heli
Notes
- Uses: get_option() to retrieve the template option.
- Uses: apply_filters() to apply the template filters on the retrieved template option.
Change Log
Since: 1.5.0
Source File
get_template() is located in wp-includes/theme.php
, line 241.
Related
テーマのパス: get_template(), get_template_directory(), get_template_directory_uri(), get_theme_roots() /en, get_theme_root(), get_theme_root_uri() /en, get_stylesheet() /en, get_stylesheet_uri(), get_stylesheet_directory(), get_stylesheet_directory_uri(), get_bloginfo()
最新英語版: WordPress Codex » Function Reference/get_template (最新版との差分)