后台添加”商店”分类,在functions.php添加如下代码:
add_action( 'init', 'create_post_type' );
function create_post_type() {
register_post_type( 'shop',
array(
'labels' => array(
'name' => __( '商店' ),
'singular_name' => __( 'shop' )
),
'public' => true,
'has_archive' => true,
)
);
}
效果图:
近期评论