我正在尝试创建添加WC供应商,其中我必须仅为供应商用户创建自定义帖子类型。
下面是我使用的代码片段
register_post_type( \'acme_product\',
array(
\'labels\' => array(
\'name\' => __( \'Products\' ),
\'singular_name\' => __( \'Product\' )
),
\'public\' => true,
\'has_archive\' => true,
)
);
above code works well with admin user.