1、在主题文件夹下新建一个文件夹专门放自定义模板文件(如果你只有一个自定义页面就不需要这步了)。
2、在当前主题的”functions.php “文件里面加上以下函数:
PHP
function 主题id_loadCustomTemplate($template)
{
global $wp_query;
if (!file_exists($template)) return;
$wp_query->is_page = true;
$wp_query->is_s