get_singular_template

函数
get_singular_template ( No parameters )
返回值
  • (string) Full path to singular template file
相关
  • get_query_template()
定义位置
相关方法
get_single_templateget_search_templateget_query_templateget_index_templateget_tag_template
引入
4.3.0
弃用
-

get_singular_template函数是一个WordPress函数,用于检索特定文章类型的单一文章模板文件的路径: 这个函数把文章类型作为参数,并返回到单一的文章模板文件的路径。

检索当前或父模板中的单一模板的路径。

模板层次和模板路径可通过{@see ‘$type_template_hierarchy’}和{@see ‘$type_template’}动态钩子过滤,其中`$type`是’singular’。

function get_singular_template() {
	return get_query_template( 'singular' );
}

常见问题

FAQs
查看更多 >
闪电侠

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

2025-12-14 12:36:31

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

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

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