首页 WordPress函数大全 is_page_template()

is_page_template()

2020-05-02 / 2802阅 / 悠然

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

is_page_template( string|array $template = '' )

Determines whether currently in a page template.

描述

This template tag allows you to determine if you are in a page template. You can optionally provide a template filename or array of template filenames and then the check will be specific to that template.

For more information> Conditional Tags article in the Theme Developer Handbook.

参数

$template

(string|array)
(Optional)
The specific template filename or array of templates to match.

Default value: ''

返回

(bool) True on success, false on failure.

大家谈论
    我的见解