【发布时间】:2016-03-11 11:05:32
【问题描述】:
我已将自定义帖子类型添加为“博客”并创建了 single-blog.php。它工作正常,但是当我创建archive-blog.php 时,它不起作用。它仍将使用默认存档模板。
我为自定义帖子类型“博客”创建了自定义分类“blogcat”。
你能告诉我为什么它没有读取archive-blog.php吗?
我的永久链接结构是帖子名称
谢谢,
【问题讨论】:
-
记住 has_archive 参数设置为真。 wpbeginner.com/wp-tutorials/… 这会有所帮助。
-
是的,has_archive 已经设置为 true。我正在为自定义帖子类型“博客”使用自定义分类法“blogcat”。可能这就是它要使用默认archive.php的原因吗?
标签: wordpress templates post types archive