问题描述
我创建了一个自定义帖子类型来处理简单的视频库自定义帖子类型:
// Register Taxonomy Group
function create_group_tax() {
$labels = array(
'name' => _x( 'Groups','taxonomy general name','textdomain' ),'singular_name' => _x( 'Group','taxonomy singular name','search_items' => __( 'Search Groups','all_items' => __( 'All Groups','parent_item' => __( 'Parent Group','parent_item_colon' => __( 'Parent Group:','edit_item' => __( 'Edit Group','update_item' => __( 'Update Group','add_new_item' => __( 'Add New Group','new_item_name' => __( 'New Group Name','menu_name' => __( 'Group',);
$args = array(
'labels' => $labels,'description' => __( '','hierarchical' => true,'public' => true,'publicly_queryable' => true,'show_ui' => true,'show_in_menu' => true,'show_in_nav_menus' => true,'show_tagcloud' => true,'show_in_quick_edit' => true,'show_admin_column' => true,'show_in_rest' => true,);
register_taxonomy( 'media-groups',array('galleryitem'),$args );
}
add_action( 'init','create_group_tax' );
// Register Taxonomy Group
function create_group_tax() {
$labels = array(
'name' => _x( 'Groups','create_group_tax' );
帖子类型和税款显示在管理区域中,并且我已经成功添加了帖子并对其进行了分类。
我在当前拥有的唯一分类术语中添加了一个菜单项,并分配了4个帖子。
并且我重新保存了永久链接以刷新它们。
菜单项(/ media-groups / author-interviews /)显示“找不到内容”标题和搜索栏。
我添加了一个自定义的分类模板“ taxonomy-media-groups.PHP”,该模板更新了“未找到内容”页面的显示方式,但仍然不显示任何内容。
CPT的链接(/ media-gallery /)重定向到主页。
现在,我不需要直接链接到CPT,但最终我将根据条款将其转换为可过滤的画廊。
现在,我们希望能够为“作者访谈”的税收条款创建自定义目标网页。
我想念的是它全部都在管理员那里工作,但是我什么都没出现在前端?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)