jankx / data-factory
从 theme.json 设置创建文章类型和分类
dev-master
2024-07-08 01:27 UTC
Requires
- jankx/core: *
This package is auto-updated.
Last update: 2024-09-08 01:45:23 UTC
README
从 theme.json 设置创建文章类型和分类
theme.json
向 theme.json 添加配置以创建文章类型或分类
{
"custom": {
"post_types": [
{
"name": "Post type name",
"singular_name": "Post type singular name",
"type": "define post type here",
"slug": "post type slug",
"options": {
}
}
],
"taxonomies": [
{
"name": "Taxonomy name",
"singular_name": "Taxonomy singular name",
"type": "define taxonomu here",
"slug": "taxonomy slug",
"options": {
},
"post_types": ["post-type-slug"]
}
]
}
}