Find content by slug
get_content_by_slugFind content by URL slug across all WordPress post types or restrict to specific ones. Resolves the post type when you only know the URL tail.
Instructions
Look up content by slug across every content type at once, or within specific types. Use when you know the URL tail but not which post type owns it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The slug, i.e. the last path segment of the URL. | |
| types | No | Restrict to these content types. Defaults to every REST-exposed type. | |
| 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_content | No | Include full bodies in the results. |