admin管理员组文章数量:1128745
I checked everything suggested in that response: "page attributes" option is checked, template file is located at theme root folder, I tried several file encoding options in my text editor (UTF8 with or without BOM), I tried switching to another theme then back to my custom theme, I do have the right stuff on top:
<?php
/*
Template Name: Page Actualites
*/
?>
Why am I still not seeing the page template dropdown list?
I checked everything suggested in that response: "page attributes" option is checked, template file is located at theme root folder, I tried several file encoding options in my text editor (UTF8 with or without BOM), I tried switching to another theme then back to my custom theme, I do have the right stuff on top:
<?php
/*
Template Name: Page Actualites
*/
?>
Why am I still not seeing the page template dropdown list?
Share Improve this question asked Sep 26, 2020 at 12:43 drake035drake035 1,2177 gold badges34 silver badges57 bronze badges5 Answers
Reset to default 1The page was set as the posts page in settings > reading
, which prevents from chosing a specific page template since this setting automatically assigns index.php
as the page template for that page.
Had the same issue when I reinstalled wordpress, realized I haven't activated the theme on which my templates are.
So make sure you enabled your theme.
Gosh, i forget this everytime :x
The documentation of the feature is really good. So check them, especially the name of the file, also the rights of the file via FTP or ssh - is it readable.
Do not use page-
as a prefix, as WordPress will interpret the file as a specialized template, meant to apply to only one page on your site.
Remove also the PHP close tag, not necessary and often more problematic.
Wordpress 5.8 introduced template editor: https://make.wordpress.org/core/2021/06/16/introducing-the-template-editor-in-wordpress-5-8/
For me, my theme was missing the default style.css
file, Once I added that, I could see the page template dropdown again. Using the Classic Editor plugin.
本文标签: Page template option missing
版权声明:本文标题:Page template option missing 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736727385a1949797.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论