创建新页面时为什么看不到自定义模板?

时间:2019-09-06 10:42:31

标签: wordpress templates child-theming

我只是开始了解WordPress模板。

我制作了一个非常简单的模板,称为“ attribute_information_popup.php”,并将其放在子主题的文件夹“ page_templates”中。

<?php 
/* 
 * Template Name: Attribute Information Popup Page
 * description: Template for making pages used in the product attributes information popup.
 */ 
?>

<h1>test</h1>`

当我进入“创建页面”时,在页面编辑器右侧的“页面属性”部分的下拉列表中没有看到我的模板。

1 个答案:

答案 0 :(得分:0)

首先,您不需要在子主题中创建任何文件夹。这不是强制性的。其次,检查是否已激活相同的主题。我的意思是我已经两次遇到相同的问题。我没有在下拉菜单中看到该页面。然后我看到我已经激活了父主题。然后,我激活了子主题,问题解决了。