Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

post type: haitao

for zhizhizhi.com

// Register Custom Post Type
function custom_post_type_haitao() {

	$labels = array(
		'name'                => _x( '海淘', 'Post Type General Name', 'text_domain' ),
		'singular_name'       => _x( '海淘', 'Post Type Singular Name', 'text_domain' ),
		'menu_name'           => __( '海淘', 'text_domain' ),
		'name_admin_bar'      => __( '海淘', 'text_domain' ),
		'parent_item_colon'   => __( '父项目:', 'text_domain' ),
		'all_items'           => __( '全部项目:', 'text_domain' ),
		'add_new_item'        => __( '添加新项目', 'text_domain' ),
		'add_new'             => __( '添加', 'text_domain' ),
		'new_item'            => __( '新项目', 'text_domain' ),
		'edit_item'           => __( '编辑项目', 'text_domain' ),
		'update_item'         => __( '更新项目', 'text_domain' ),
		'view_item'           => __( '查看项目', 'text_domain' ),
		'search_items'        => __( '搜索项目', 'text_domain' ),
		'not_found'           => __( '未发现', 'text_domain' ),
		'not_found_in_trash'  => __( '回收站里也没有', 'text_domain' ),
	);
	$rewrite = array(
		'slug'                => 'haitao',
		'with_front'          => false,
		'pages'               => true,
		'feeds'               => true,
	);
	$args = array(
		'label'               => __( 'haitao', 'text_domain' ),
		'description'         => __( '值值值的海淘优惠信息', 'text_domain' ),
		'labels'              => $labels,
		'supports'            => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'revisions', 'page-attributes', ),
		'taxonomies'          => array( 'category', 'post_tag' ),
		'hierarchical'        => false,
		'public'              => true,
		'show_ui'             => true,
		'show_in_menu'        => true,
		'menu_position'       => 5,
		'show_in_admin_bar'   => true,
		'show_in_nav_menus'   => true,
		'can_export'          => true,
		'has_archive'         => true,
		'exclude_from_search' => false,
		'publicly_queryable'  => true,
		'rewrite'             => $rewrite,
		'capability_type'     => 'post',
	);
	register_post_type( 'haitao', $args );

}

// Hook into the 'init' action
add_action( 'init', 'custom_post_type_haitao', 0 );