【发布时间】:2018-02-01 10:46:30
【问题描述】:
我通过
创建了一个类似“页面”的管理菜单栏register_post_type()
并且红色表示在页面属性部分的自定义模板和默认模板之间切换的功能在 register_post_type() 中不可用。(图片)
有谁知道我需要在 php 文件本身中写什么,才能将默认模板更改为我想要的任何自定义模板?
【问题讨论】:
-
我是否正确假设您的意思是您希望自定义帖子类型中的页面模板功能?
-
是的,但是根据 [Wordpress codex ](codex.wordpress.org/Function_Reference/add_post_type_support) "$supports = 'page-attributes' (模板和菜单顺序) (hierarchical must be true) (the page模板选择器仅适用于页面帖子类型)"