Posttypes Taxonomies
Last updated
Both CPTs and taxonomies live in their respective config files.
PorterWP validates, merges defaults, and calls register_post_type() / register_taxonomy() during the init action.
Post Types
posttypes.json
Porter_Config_Posttypes
Taxonomies
taxonomies.json
Porter_Config_Taxonomies
If you omit the labels object, PorterWP generates a full label set from the slug (e.g. project → Project, Projects, Add new Project, etc.).
When you save posttypes.json, Gulp fires generateCptIcons() and writes:
porter/inc/posttypes/{slug}/icon.svgWordPress’ list table and Site Editor then render the icon automatically.
Add taxonomies inside a CPT, or object_type inside a taxonomy to connect them.
# posttypes.json
{
"project": {
"taxonomies": ["topic", "status"]
}
}Last updated
# taxonomies.json
{
"status": {
"object_type": ["project"]
}
}