Taxonomies Json

Configures custom taxonomies and links them to post types.

{
  "version": "1.0.0",
  "taxonomies": {
    "sector": {
      "labels": { "singular": "Sector", "plural": "Sectors" },
      "hierarchical": true,
      "rewrite": { "slug": "sectors" },
      "show_in_rest": true,
      "posttypes": ["project", "job"]
    },

    "tagline": {
      "labels": { "singular": "Tagline", "plural": "Taglines" },
      "hierarchical": false,
      "show_in_rest": true,
      "posttypes": ["project"]
    }
  }
}
Path
Purpose

version

Bumps cache + flushes rewrite rules like posttypes.

taxonomies.{slug}.hierarchical

true for category‑style, false for tag‑style.

rewrite.slug

Override URL base.

show_in_rest

Must be true for Gutenberg/REST.

posttypes

CPT slugs this taxonomy applies to.

PorterWP automatically registers the taxonomy and attaches it to each CPT in the list.


Back to Config Index

Last updated