get_template

函数
get_template ( No parameters )
返回值
  • (string) Template name.
定义位置
相关方法
get_404_templateget_tag_templateget_home_templateget_date_templateget_page_template
引入
1.5.0
弃用
-

get_template: 这个函数检索页面的主要模板文件的路径。它不接受任何参数,以字符串形式返回模板文件的路径。

检索活动主题的名称。

function get_template() {
	/**
	 * Filters the name of the active theme.
	 *
	 * @since 1.5.0
	 *
	 * @param string $template active theme's directory name.
	 */
	return apply_filters( 'template', get_option( 'template' ) );
}

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2026-01-14 16:02:24

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: