WordPress定位当前使用模版

 把下面代码插入到wp-includes/template-loader.php,66行

if($_GET[tpl]=='die'){
die($template);
}

浏览任意页面,在网址后加上&tpl=die,就能得知当前页面使用的是哪个模版了,找一个页面测试下输出: 

大家可测试下...默认展示文章使用的是single.php,展示页面用的是page.php

 

posted @ 2015-04-07 15:47  tinyphp  Views(442)  Comments(0Edit  收藏  举报