Custom Post Type

Post type, taxonomies, and meta configuration.

Post Type: wpdocs_doc

Registered in class-cpt.php with the following settings:

Property Value
Slug /docs/{post-name}/
Supports title, editor, revisions, page-attributes, custom-fields
REST API Enabled (Block editor compatible)
Archive Enabled at /docs/
Menu Icon dashicons-book-alt
Hierarchical No — flat, ordered by menu_order

Taxonomies

doc_section — Sidebar Sections

Hierarchical taxonomy used for sidebar grouping. Each term stores:

  • _wpdocs_order (int) — Display order in sidebar (0 = first)
  • _wpdocs_icon (string) — Icon slug from Heroicons library (Premium)

doc_version — Versioned Docs

Non-hierarchical taxonomy for documentation versioning (Premium). When configured, docs can be tagged with version terms like “v1.0”, “v2.0”, and filtered via the navbar dropdown.

Meta Box

Each doc page gets a “Doc Settings” meta box in the editor sidebar with:

  • Short Description — A one-line summary shown below the page title
  • Menu Order — Numeric ordering within the assigned section

Admin List

The WPDocs admin list screen includes custom columns for Section and Order, so you can see and manage the entire documentation structure at a glance.