我已经创建了一个新的自定义分类法,我为该分类法输入的值在此处的编辑帖子区域中可见/保存:

然而,当我点击管理菜单中的'Custom Post‘按钮时,它们似乎没有保存/显示,你可以在那里进行快速编辑:

下面是我的functions.php文件中的代码:
function create_seamstitch_taxonomy() {
$labels = array(
'name' => 'Seam Stitching',
'singular_name' => 'Seam Stitching',
'menu_name' => 'Seam Stitching',
'all_items' => 'All Seam Stitching',
'parent_item' => 'Parent Seam Stitching',
'parent_item_colon' => 'Parent Seam Stitching:',
'new_item_name' => 'New Seam Stitching Name',
'add_new_item' => 'Add New Seam Stitching',
'edit_item' => 'Edit Seam Stitching',
'update_item' => 'Update Seam Stitching',
'separate_items_with_commas' => 'Separate Seam Stitchings with commas',
'search_items' => 'Search Seam Stitching',
'add_or_remove_items' => 'Add or remove Seam Stitchings',
'choose_from_most_used' => 'Choose from the most used Seam Stitchings',
'not_found' => 'Seam Stitching Not Found',
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => true,
);
register_taxonomy( 'seamstitching', 'buttonup', $args );
}
// Hook into the 'init' action
add_action( 'init', 'create_seamstitch_taxonomy', 0 );有人知道为什么会发生这种情况吗?在我的帖子中,这似乎也不起作用:
<?php echo get_the_term_list( $post->ID, 'seam_stitching', 'Seam Stitching: ', ', ', '' ); ?> 谢谢你的帮助!
发布于 2014-04-03 11:18:03
好了,我更改了分类法的名称,并重新输入了数据,现在一切正常。此问题可能源于首先在名称中使用大写首字母注册分类,然后切换为较低。我完全改变了它,现在它似乎起作用了。
https://stackoverflow.com/questions/22826858
复制相似问题