Custo Post Wordpress
add_action('init', 'newspost');
function newspost(){
$args = array(
'label' => '新着更新',
'labels' => array(
'name' =>'新着更新一覧',
'singular_name' =>'新着更新',
'menu_name' =>'新着更新',
),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'query_var' => true,
'rewrite' => true,
'has_archive' => true,
'capability_type' => 'post',
'hierarchical' => false,
'menu_position' => 5,
'supports' => array('title','editor'),
'rewrite' => array(
'slug' => 'news',
'with_front' => true
),
'menu_icon' => 'dashicons-format-aside',
);
register_post_type('newspost',$args);
}