Find content by slug
get_content_by_slugRetrieve WordPress content by slug across all content types at once, or narrow by specific types. Use when you know the URL tail but not the owning post type.
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 content 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. |