Create, read, update, and delete WordPress posts, pages, and custom post types. The foundation of everything content-related in the Abilities API.

17

Total

10

Read

5

Write

2

Delete

Overview

The Content module manages WordPress post objects — posts, pages, and custom post types. It wraps core functions like wp_insert_post(), get_post(), and wp_delete_post() behind named, schema-validated, permission-gated abilities.

Block markup note: content/get returns rendered HTML with block comments stripped. For raw block markup, use SSH + WP-CLI. The content/update ability accepts full block markup and preserves it on save.

Ability Reference

AbilityTypeDescription
content/listRList posts with filters (type, status, category, tag, author, search)
content/getRGet a single post by ID with full content and metadata
content/get-by-slugRGet a post by its URL slug
content/get-textRGet plain text content (block markup stripped)
content/get-snapshotRGet a lightweight snapshot — title, excerpt, status, dates
content/search-replaceRPreview search-replace across content without applying
content/find-by-urlRResolve a URL to its post ID and type
content/discover-typesRList all registered post types and their settings
content/list-structureRGet hierarchical page/post structure for a post type
content/get-site-mapRFull site content map with counts per type and status
content/createWCreate a new post, page, or custom post type
content/updateWUpdate an existing post — content, title, status, meta
content/appendWAppend block markup to existing content without full rewrite
content/batch-updateWUpdate multiple posts in one call (status, author, category)
content/change-typeWConvert a post from one type to another (post → page)
content/deleteDTrash or permanently delete a post
content/duplicateWDuplicate a post with all content and metadata

Common Workflows

Publish a blog post

  1. Call content/create with title, content, and status: "draft"
  2. Call taxonomies/assign-to-content to set categories and tags
  3. Call media/create to upload a featured image
  4. Call content/update with featured_image set to the media ID
  5. Call content/update with status: "publish" when ready

Survey site content structure

  1. Call content/get-site-map for a full overview of all content
  2. Call content/discover-types to see registered post types
  3. Call content/list-structure for hierarchical page trees
  4. Call content/list with filters to drill into specific content

Surgical content edit

  1. Call content/get to read the current content
  2. Modify the specific block markup needed
  3. Call content/update with the full modified content
  4. Or use content/append if adding to the end

Blocks Module

Parse, insert, update, and manage Gutenberg blocks within posts

Media Module

Upload, manage, and attach images, files, and media to posts

Taxonomies Module

Categories, tags, and custom taxonomies — create, assign, manage

Revisions Module

Version history — list, compare, restore, and purge post revisions

Known Gotchas

Block markup is stripped from content/get. The content/get ability returns rendered HTML — block comment delimiters (<!-- wp:paragraph -->) are stripped by WordPress. For raw block markup, use SSH + WP-CLI. content/update and content/append accept and preserve full block markup.

content/append is not content/update. content/append adds blocks to the end of existing content without reading the full page. content/update replaces the entire content. If you use content/update with only the new section, you’ll overwrite everything that was there.

Post status matters for visibility. Posts created with status: "draft" are not visible on the front end. You must explicitly set status: "publish" via content/update. There is no auto-publish.


Related