我有一个名为Resources:
的自定义帖子类型register_post_type(
'resources',
build_post_args(
'resources', 'Resource', 'Resources',
array(
'menu_icon' => 'dashicons-welcome-write-blog',
'menu_position' => 20,
'has_archive' => true,
'public' => true,
'supports' => array('editor', 'title','author','thumbnail', 'revisions'),
'taxonomies' => array('sector', 'subject', 'type'),
)
)
);
我还创建了type
的分类法,该分类法已分配给资源:
register_taxonomy(
'type',
'type',
array(
'hierarchical' => true,
'label' => 'Type',
'query_var' => true,
'rewrite' => array(
'slug' => 'type',
'with_front' => false
)
)
);
在WordPress后端中,这是我所有的type
:
但是,当我转到外观>菜单>并单击“类别”下拉菜单时,仅显示以下选项:
这是为什么?
resources
帖子类型时是否缺少很多东西。 ((注意:请删除为创建resources
帖子和type
分类法添加的所有代码)