AI content generator with voice matching and SEO integration for the WordPress block editor.
WP Content Engine lives inside the Gutenberg sidebar. Describe your topic, pick a content type, and receive three AI-generated options that match your existing writing voice. It reads your focus keyword from Yoast or Rank Math, suggests internal links, and outputs native WordPress blocks ready to insert.
- Block editor sidebar -- generate content without leaving the post editor
- Voice matching -- analyzes your published posts to learn your tone, sentence structure, vocabulary, and punctuation style
- Three options per generation -- each with slightly different temperature for variety
- SEO integration -- auto-reads focus keywords from Yoast SEO or Rank Math
- Internal linking -- suggests links to related published posts based on your keyword
- Two content types -- full blog posts and landing page sections (hero, benefit, CTA)
- Meta title and description -- generated alongside content for SEO completeness
- Voice confidence scoring -- each option shows how closely it matches your voice profile
- Word count control -- short, medium, or long output lengths
- Generation tracking -- logs every generation with token usage and voice profile status
- Free tier with upgrade path -- 5 generations/month free, unlimited on Pro/Agency
- WordPress 6.0+
- PHP 7.4+
- Gutenberg block editor (not the Classic Editor)
- Upload the
wp-content-enginedirectory towp-content/plugins/. - Run
composer installinside the plugin directory (or use the bundled autoloader fallback). - Activate the plugin through the WordPress admin.
- Navigate to Content Engine > Settings to configure your API connection.
The plugin uses Claude (Anthropic) as its AI provider. Configure access in one of two ways:
Via SmartWeb Proxy (default): Enter your proxy URL and site token. Credits are managed centrally.
Via Direct API Key: Enter your Anthropic API key directly. The key is encrypted before storage.
Before generating content, teach the engine your writing voice:
- Publish at least 3 blog posts (the more the better, up to 20 are analyzed).
- Go to Content Engine > Settings and click Analyze My Voice.
- The engine extracts structural metrics (sentence length, vocabulary tier, readability grade, punctuation patterns) and uses Claude to identify tone, humor level, jargon density, and urgency.
- A voice profile is stored and refreshed weekly via cron.
What the voice profile captures:
- Average sentence length and readability grade (Flesch-Kincaid)
- Vocabulary tier (accessible, mid-professional, technical)
- Punctuation style ratios (em-dashes, semicolons, questions, exclamations)
- Tone markers (conversational, formal, authoritative)
- Humor and jargon levels
- Top 30 characteristic words
- 2-3 example passages for prompt embedding
If Claude is unavailable during analysis, a heuristic fallback derives tone from sentence length and vocabulary metrics.
- Create or edit a post in the block editor.
- Open the Content Engine sidebar panel (robot icon in the top toolbar).
- Enter your topic (e.g., "5 ways to improve WordPress site speed").
- Set the focus keyword (or let the engine pull it from your SEO plugin).
- Choose length: short (~500 words), medium (~1000 words), or long (~1500+ words).
- Click Generate.
- Review the three options. Each shows:
- Preview text (first 100 words)
- Word count
- Voice confidence percentage
- Meta title and description
- Click Insert on your preferred option to add the blocks to your editor.
- Switch the content type to Landing Section.
- Choose a section type:
- Hero -- headline, subheadline, CTA button text
- Benefit -- feature/benefit blocks with supporting copy
- CTA -- call-to-action section with urgency copy
- Enter your topic and optional focus keyword.
- Click Generate and insert the result.
The voice profile is injected into every generation prompt. The AI is instructed to:
- Match your average sentence length
- Use your vocabulary tier
- Mirror your punctuation habits (e.g., frequent em-dashes)
- Adopt your tone (conversational, formal, etc.)
- Include your characteristic words naturally
The ToneMatcher then scores each generated option against the profile, giving you a confidence percentage so you can pick the option that sounds most like you.
| Plugin | Detection | Focus Keyword Source |
|---|---|---|
| Yoast SEO | WPSEO_VERSION constant |
YoastAdapter reads _yoast_wpseo_focuskw post meta |
| Rank Math | RANK_MATH_VERSION constant |
Reads rank_math_focus_keyword post meta |
| None | -- | Enter keyword manually in the sidebar |
The engine auto-detects which SEO plugin is active and reads the focus keyword for the current post. If no keyword is set, you can enter one manually, or leave it blank for keyword-agnostic content.
When a focus keyword is provided, the InternalLinker searches your published posts for related content and passes up to 5 link suggestions to the AI prompt. The generated content naturally weaves in internal links.
All endpoints are under the wce/v1 namespace and require edit_posts capability.
POST /wp-json/wce/v1/generate
Body (JSON):
{
"content_type": "blog_post",
"topic": "WordPress performance optimization tips",
"length": "medium",
"focus_keyword": "wordpress speed",
"post_id": 42
}For landing sections:
{
"content_type": "landing_section",
"topic": "SaaS onboarding flow",
"section_type": "hero",
"focus_keyword": "saas onboarding"
}Response (200):
{
"success": true,
"options": [
{
"blocks": [
{ "type": "heading", "level": 2, "content": "..." },
{ "type": "paragraph", "content": "..." }
],
"meta_title": "...",
"meta_description": "...",
"word_count": 1024,
"voice_confidence": 87,
"preview": "First 100 words of the first paragraph..."
}
],
"remaining": 3,
"tokens_used": 4521
}POST /wp-json/wce/v1/voice/analyze
Triggers a fresh voice analysis from published posts. Returns the full voice profile.
GET /wp-json/wce/v1/voice/profile
Returns the stored voice profile, or { "analyzed": false } if not yet analyzed.
GET /wp-json/wce/v1/seo/keywords/{post_id}
Returns the focus keyword, detected SEO plugin, and internal link suggestions for a post.
wp-content-engine/
src/
AI/
ClaudeProvider.php # Anthropic API client
PromptBuilder.php # Blog post + landing section prompt assembly
ProviderInterface.php # Provider contract
VoiceAnalyzer.php # Voice profiling from published posts
Admin/
SettingsPage.php # Plugin settings UI
Content/
ContentGenerator.php # Generation orchestrator + REST handler
ToneMatcher.php # Voice confidence scoring
Editor/
BlockEditorPanel.php # Gutenberg sidebar registration + asset enqueue
BlockGenerator.php # Parses AI response into WordPress block arrays
SEO/
InternalLinker.php # Related post search for link suggestions
SEOIntegration.php # Auto-detect Yoast/Rank Math, unified keyword access
YoastAdapter.php # Yoast-specific meta access
Plugin.php # Singleton bootstrap, DB tables, cron
assets/
js/editor-sidebar.js # Gutenberg sidebar React component
css/admin.css # Editor styles
templates/ # Admin page templates
languages/ # Translation files
PSR-4 via Composer. Namespace ContentEngine\ maps to src/. Falls back to a manual spl_autoload_register if Composer autoload is missing.
One custom table created on activation:
{prefix}wce_generations-- logs every generation (post_id, user_id, prompt, response, provider, content_type, tokens_used, voice_profile_used, created_at)
Generation counts are derived from this table (no separate counter).
A weekly cron job (wce_weekly_voice_refresh) refreshes the voice profile automatically so it stays current as you publish new content.
composer require --dev squizlabs/php_codesniffer wp-coding-standards/wpcs
./vendor/bin/phpcs --standard=phpcs.xml src/| Tier | Generations/Month |
|---|---|
| Free | 5 |
| Pro | Unlimited |
| Agency | Unlimited |
The limit uses a rolling 30-day window, counted per user from the wce_generations table.
- Initial release
- Blog post and landing section generation
- Voice matching with structural metrics and AI tone analysis
- Yoast SEO and Rank Math integration
- Internal link suggestions
- Block editor sidebar panel
- Three options per generation with voice confidence scoring
GPL-2.0-or-later. See LICENSE.