如何在家乡wordpress主题中使用我自己创建的模板

时间:2015-11-02 15:26:08

标签: wordpress wordpress-theming wordpress-theme-customize

我开始使用Homeland wordpresss主题进行翻译。我有一个问题。我已经创建了自己的模板但是当我去任何页面使用模板时,我创建的那个模板没有出现。任何想法为什么?

1 个答案:

答案 0 :(得分:2)

如果您要制作页面模板,请确保在top:

上运行此代码
<?php /* Template Name: Example Template */ ?>

如果您要为帖子,自定义帖子类型,类别或分类制作模板,请确保使用正确的wordpress命名结构。
single-post.php
single-custom-post-type.php

等...

相关问题