注册post类型时,请设置参数\'has_archive\' 在你的情况下plugins.
的文档块register_post_type() 表示:
@type bool|string $has_archive
是否应该有post类型的存档,或者如果是字符串,则是要使用的存档段塞。将生成适当的重写规则,如果$rewrite 已启用。违约false.
缩小示例:
register_post_type( \'plugin\', [ \'has_archive\' => \'plugins\' ] );