用于获取全站编辑(FSE)主题中使用的区块模板信息,包括列出、获取特定模板等操作。
适合在开发或管理FSE主题时,需要查看或操作区块模板的场景。
| 参数 | 说明 |
|---|---|
--type |
模板类型,如 wp_template 或 wp_template_part。 |
--area |
模板区域,如 header、footer 等。 |
$ wp block template list
$ wp block template list --type=wp_template_part --area=header
$ wp block template get twentytwentyfour//single