我升级Wordpress 8.然后创建一个新页面测试。
这个页面的slug正在测试,所以我在theme direcory中创建了一个新文件。
page-testing.php
然后我运行测试不会出现在page-testing.php文件中。
请帮忙。
谢谢。答案 0 :(得分:4)
对所有失去灵魂的人:
如果您的Wordpress页面长度小于6个字符,则自定义页面模板将无效。
答案 1 :(得分:1)
我不确定什么是错的,因为提供的信息非常少。但我想如果你有一个自定义页面模板集,那就是问题所在。根据WordPres模板层次结构。优先顺序如下: -
Page display
Template file used to render a static page (page post-type)
1. custom template file - The Page Template assigned to the Page. See get_page_templates().
2. page-{slug}.php - If the page slug is recent-news, WordPress will look to use page-recent-news.php
3. page-{id}.php - If the page ID is 6, WordPress will look to use page-6.php
4. page.php
5. index.php
答案 2 :(得分:0)
我无法显示我的个性化页面,因为我必须在设置 > 永久链接中配置我的永久链接并将通用设置从“普通”更改为“帖子名称”,然后在页面 > 永久链接 > URL slug 中。更改它我的页面工作得很好。