function my_custom_init()
{
$labels = array(
'name' => '动态',
'singular_name' => '动态',
'add_new' => '添加一条新动态',
'add_new_item' => '添加一条新动态',
'edit_item' => '编辑动态',
'new_item' => '新动态',
'all_items'=>'所有动态',
'view_item' => '查看动态',
'search_items' => '搜索动态',
'not_found' => '没有动态',
'not_found_in_trash' => '回收站中没有动态',
'parent_item_colon' => '',
'menu_name' => '动态'
);
$args = array(
'labels' => $labels,
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'exclude_from_search' =>false,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => true,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'supports' => array('editor','author')
);
register_post_type('dynamic',$args);
}
add_action('init', 'my_custom_init');
本文由
清空教程网 发布在
清空教程网,转载此文请保持文章完整性,并请附上文章来源(清空教程网)及本页链接。
原文链接:https://www.clearnull.com/514.html