Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当一篇文章被交叉索引时,你如何控制 wordpress 显示哪个自定义(基于类别)模板?乍一看似乎无法控制,但我确信有办法。
您是否将参数放入生成帖子链接的查询中,还是什么?
谢谢。
如果您尝试为特定类别显示某个模板,Wordpress 可以满足您的要求。只需创建一个名为“category-%slug%.php”的模板,将其粘贴到您的主题目录中,当您查看该类别时,您将看到您创建的模板。
有关 Wordpress 模板层次结构的更多信息