get_404_template()

获取404模版文件404.php

描述

检索当前模板或父模板的404模板路径

用法

<?php get_404_template(); ?>

参数

None.

返回值

(string) 

Returns result from get_query_template(‘404’).

注意

使用到: get_query_template()

历史

添加于 版本: 1.5.0

源文件

get_404_template() 函数的代码位于 wp-includes/template.php (for v3.3.3 and below function 函数的代码位于 wp-includes/theme.php).

/**
* Retrieve path of 404 template in current or parent template.
*
* The template path is filterable via the dynamic {@see ‘$type_template’} hook,
* e.g. ‘404_template’.
*
* @since 1.5.0
*
* @see get_query_template()
*
* @return string Full path to 404 template file.
*/

function get_404_template() {

return get_query_template(‘404’);

}

原文:http://codex.wordpress.org/Function_Reference/get_404_template

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索