为什么';t我的自定义帖子字段是';t出现在视图中


Why aren't my custom post fields aren't showing up in the view?

我创建了一个自定义帖子,如下所示。它在我的后台管理面板中显示得很好,但当我去查看帖子时,它是空的。请参阅此处查看我的一个自定义帖子。我是否遗漏了告诉wordpresshwo显示字段的内容?

add_action('init', 'give_gnt_register');
function give_gnt_register() {
$labels = array(
    'name' => _x('Offered items'),
    'singular_name' => _x('Item'),
    'add_new' => _x('Give an item away'),
    'add_new_item' => __('Give a new item away'),
    'edit_item' => __('Edit item'),
    'new_item' => __('Give Item Away'),
    'view_item' => __('View Item'),
    'search_items' => __('Search Offered Items'),
    'not_found' =>  __('Nothing found'),
    'not_found_in_trash' => __('Nothing found in Trash'),
    'parent_item_colon' => ''
);
$args = array(
    'labels' => $labels,
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true,
    'query_var' => true,
    'menu_icon' => get_stylesheet_directory_uri() . '/article16.png',
    'rewrite' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'menu_position' => null,
    'taxonomies' => array('category'),
    'supports' => array('title','thumbnail', 'custom-fields','comments')
  ); 
register_post_type( 'give' , $args );

}

add_action('init', 'give_gnt_register');
function give_gnt_register() {
wp_create_category('Give');
$labels = array(
    'name' => _x('Offered items'),
    'singular_name' => _x('Item'),
    'add_new' => _x('Give an item away'),
    'add_new_item' => __('Give a new item away'),
    'edit_item' => __('Edit item'),
    'new_item' => __('Give Item Away'),
    'view_item' => __('View Item'),
    'search_items' => __('Search Offered Items'),
    'not_found' =>  __('Nothing found'),
    'not_found_in_trash' => __('Nothing found in Trash'),
    'parent_item_colon' => ''
);
$args = array(
    'labels' => $labels,
    'public' => true,
    'publicly_queryable' => true,
    'show_ui' => true,
    'query_var' => true,
    'menu_icon' => get_stylesheet_directory_uri() . '/article16.png',
    'rewrite' => true,
    'capability_type' => 'post',
    'hierarchical' => false,
    'menu_position' => null,
    'taxonomies' => array('category'),
    'supports' => array('title','thumbnail', 'custom-fields','comments')
  ); 
    // create "give" post type
    register_post_type('give', $args);
}

我只是添加了CCD_ 1。

祝你好运。