首页 WordPress函数大全 get_query_template()

get_query_template()

2020-05-01 / 5757阅 / 悠然

如何你看完本文还不知道如何使用该函数,可以联系我定制视频教程,50元/个函数,学不会全额退款

get_query_template( string $type, array $templates = array() )

Retrieve path to a template

描述

Used to quickly retrieve the path of a template without including the file extension. It will also check the parent theme, if the file exists, with the use of locate_template(). Allows for more generic template location without the use of the other get_*_template() functions.

参数

$type

(string)
(Required)
Filename without extension.

$templates

(array)
(Optional)
An optional list of template candidates

Default value: array()

返回

(string) Full path to template file.

大家谈论
    我的见解