Discover content types
discover_content_typesList all content types on a WordPress site, including custom post types, with REST base, hierarchy, taxonomies, and supported fields to determine what's accessible via REST.
Instructions
List every content type registered on the site — post, page, and any custom post type — with its REST base, whether it is hierarchical, which taxonomies apply, and which fields it supports. Call this before working with an unfamiliar site: a type absent here is registered with show_in_rest => false and cannot be reached over REST at all.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_id | No | Which configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids. | |
| include_counts | No | Also report how many items exist per type. Costs one extra request per type. |