humanpages
Search and hire real humans for tasks — photography, delivery, research, and more
Create, edit, and publish WordPress posts via REST API with full Gutenberg block support. Use when Codex needs to automate WordPress content publishing, generate articles programmatically, or manage posts through API calls. Includes authentication methods (JWT, Application Passwords), Gutenberg block serialization, featured images, categories, tags, and draft/publish workflows.
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
SkillHub CLI
skillhub install chirukinbb/wordpress-api-gutenberg打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。
将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。
This skill provides comprehensive guidance for interacting with WordPress REST API to create and manage posts using Gutenberg block editor format. It covers authentication, block serialization, media upload, and publishing workflows.
Before using the API, ensure you have:
WordPress site with REST API enabled (default)
Authentication credentials:
/wp-admin/admin.php?page=application-passwords
Base URL: https://your-site.com/wp-json/wp/v2
# Set environment variables
export WP_URL="https://your-site.com"
export WP_USERNAME="admin"
export WP_APPLICATION_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx"
import requests
import os
wp_url = os.environ.get('WP_URL')
username = os.environ.get('WP_USERNAME')
password = os.environ.get('WP_APPLICATION_PASSWORD')
auth = (username, password)
If using JWT plugin, obtain token first:
import requests
wp_url = "https://your-site.com"
username = "admin"
password = "password"
# Get token
resp = requests.post(f"{wp_url}/wp-json/jwt-auth/v1/token",
json={"username": username, "password": password})
token = resp.json()['token']
headers = {"Authorization": f"Bearer {token}"}
WordPress REST API expects posts in Gutenberg's serialized block format. The content field should contain block comments and HTML.
def create_gutenberg_post(title, content_blocks):
"""
Create a post with Gutenberg blocks.
Args:
title: Post title
content_blocks: List of block dictionaries with 'blockName' and 'attrs'
Returns:
JSON data...
这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。
# WordPress API with Gutenberg
## Overview
This skill provides comprehensive guidance for interacting with WordPress REST API to create and manage posts using Gutenberg block editor format. It covers authentication, block serialization, media upload, and publishing workflows.
## Quick Start
Before using the API, ensure you have:
1. **WordPress site** with REST API enabled (default)
2. **Authentication credentials**:
- Application Password (WordPress 5.6+): Generate at `/wp-admin/admin.php?page=application-passwords`
- JWT Authentication plugin installed (alternative)
- Username/password for Basic Auth (not recommended for production)
3. **Base URL**: `https://your-site.com/wp-json/wp/v2`
## Authentication
### Application Password (Recommended)
```bash
# Set environment variables
export WP_URL="https://your-site.com"
export WP_USERNAME="admin"
export WP_APPLICATION_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx"
```
```python
import requests
import os
wp_url = os.environ.get('WP_URL')
username = os.environ.get('WP_USERNAME')
password = os.environ.get('WP_APPLICATION_PASSWORD')
auth = (username, password)
```
### JWT Authentication
If using JWT plugin, obtain token first:
```python
import requests
wp_url = "https://your-site.com"
username = "admin"
password = "password"
# Get token
resp = requests.post(f"{wp_url}/wp-json/jwt-auth/v1/token",
json={"username": username, "password": password})
token = resp.json()['token']
headers = {"Authorization": f"Bearer {token}"}
```
## Creating Posts with Gutenberg Blocks
WordPress REST API expects posts in Gutenberg's serialized block format. The content field should contain block comments and HTML.
### Basic Block Structure
```python
def create_gutenberg_post(title, content_blocks):
"""
Create a post with Gutenberg blocks.
Args:
title: Post title
content_blocks: List of block dictionaries with 'blockName' and 'attrs'
Returns:
JSON data...Search and hire real humans for tasks — photography, delivery, research, and more
Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.
Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user...
Install, configure, and manage 1-SEC — an open-source, all-in-one cybersecurity platform (16 modules, single binary) on Linux servers and VPS instances. Use when the user asks to secure a server, install securi...