Documentation — Advanced Content Editor

Version 1.6.5 · Updated 6 days ago

Advanced Content Editor

Premium add-on that turns the free MxChat AI Content Generator into a publish-ready production tool. Adds programmatic SEO bulk generation, smart internal linking, AI image management, Google Search Console integration, and a headless REST API.

Overview

The free MxChat Content Generator produces full blog posts and landing pages with AI-generated images, live preview, and inline editing. Advanced Content Editor unlocks the locked PRO features inside that same editor: CSV-driven bulk page generation (programmatic SEO), automatic internal linking, full image management (upload/replace/regenerate), per-field meta generation that syncs to Rank Math / Yoast / AIOSEO, in-editor AI generation for product and custom meta-box fields, one-click AI SEO fixes, live Google Search Console data per post, surgical tool-based editing, and a bearer-token REST endpoint for headless automations. It's for site owners running content programs at scale and for engineers wiring MxChat into n8n, Zapier, or custom AI agents. Requires the free mxchat-basic plugin plus an active MxChat Pro license.

Setup

  1. Upload mxchat-advanced-content.zip via Plugins → Add New → Upload Plugin, or drop the folder into /wp-content/plugins/.
  2. Activate via Plugins → Installed Plugins. The add-on will warn you if mxchat-basic isn't active or if MxChat Pro isn't licensed.
  3. Confirm Pro is active at MxChat → Pro & Extensions. Without an active license, the add-on shows a notice and loads zero features.
  4. Open MxChat → Content (the existing Content Generator admin). The previously-locked PRO sections — Meta tab, Images panel actions, SEO panel, Templates, Calendar — are now unlocked.
  5. To connect Google Search Console, go to MxChat → Content → Settings and click Connect Google Search Console. OAuth runs through a Firebase Cloud Function proxy — Google credentials never touch the WordPress database. After redirect, pick the property to use.
  6. For first programmatic-SEO import, open the Templates tab on the Content page, upload a CSV (column headers become {placeholder} variables), pick template-mode or AI-mode, and preview the first five expansions before generating.

Settings

All settings live at MxChat → Content → Settings (the free plugin's settings page; this add-on adds rows and unlocks fields).

Content Model

Picks which AI model runs body generation, meta generation, AI editing, and SEO optimization. Supports OpenAI (GPT-5.2 / 5.1 / 5), Anthropic (Claude Opus 4.6, Sonnet 4.6, Haiku 4.5), Google (Gemini 3 Pro, 2.5 Pro), and xAI (Grok 4, 4.1 Fast, Code Fast). Same model is used by per-field AI buttons in the Meta tab and by the in-editor Generate with AI control.

In-Editor AI Generation

Its own card on MxChat → Content, separate from the four SEO meta fields. A master Enable in-editor generation toggle (on by default) controls whether the ✦ Generate with AI buttons appear in the post and product editor. The Custom meta fields textarea is an allowlist — one entry per line as meta_key or meta_key|Label — that decides which custom meta-box fields get a generate button. The post excerpt, and (on WooCommerce products) the short and long description, are always covered without listing them. Block-editor generation for a custom field requires that field's meta key to be REST-registered; non-REST keys still work in the Classic editor.

Image Model

Which model generates and re-generates images. Options: OpenAI GPT Image 1.5 (1536x1024 PNG), xAI Grok 2 Image (URL-based), Google Gemini (inline base64, 16:9). Default: whatever you set in core MxChat settings.

Enable Internal Linking

Toggle that activates the smart internal linking funnel for blog posts only (landing pages skip it). When on, every AI-generated post pulls up to 20 candidate posts from your existing content and tells the model to weave in 3-5 natural links.

Tool Use for AI Editing

Toggle that switches AI editing from full-page rewrites to surgical str_replace calls. Off by default for older models; on by default for the supported model list (GPT-5.x, Claude 4.5/4.6, Gemini 3 Pro / 2.5 Pro, Grok 4).

AI Auto-Optimize Checks

Checkboxes that pick which optimizations run when you click AI Auto-Optimize on a post: Readability, Internal Links, Image ALT Text, Featured Image. Each can also be run individually from the SEO detail panel.

Connect Google Search Console

Button that kicks off OAuth. After authorizing, select which Search Console property to bind. Once connected, clicks/impressions columns appear in the SEO table and per-post search data appears in the SEO detail panel. Disconnect any time to wipe tokens.

Business Info

Free-form text describing your product/service. Used by the Content Calendar to generate a contextually-relevant 30-day plan.

FAQ Schema Suggestions

Off by default. When enabled and Google Search Console is connected, two surfaces appear: the FAQ Suggestions panel in the post editor sidebar, and the FAQ Coverage table in the SEO section. Both read the Search Console data the SEO table already fetches — enabling this does not add requests to Google. With the setting off, neither surface loads and nothing changes.

If Search Console isn't connected yet, the settings card says so and the coverage table stays hidden until it is.

Features

  • Programmatic SEO (CSV bulk generation): Upload a CSV and generate hundreds of unique pages — template mode replaces {placeholders} from existing pages instantly (no AI tokens), AI mode writes original content for every row. Supports spintax {best|top|leading}, custom slug templates like {service}-in-{city}, section structure templates, duplicate-slug detection, scheduled publishing, and queues up to 500 rows.
  • Smart Internal Linking: When generating a blog post, the add-on searches your existing posts for up to 20 candidates by keyword and title-word match, then injects them into the AI prompt with instructions to link to 3-5 naturally. Uses real permalinks — no hallucinated URLs — and only fires for posts, not landing pages.
  • Full AI Image Management: Every image in a generated post gets Upload (pick from Media Library) and Regenerate (re-roll with original or new prompt) actions. The old URL is swapped everywhere it appears, including custom CSS background-images. Generation uses your configured image model; original prompts are stored as _mxchat_image_prompt attachment meta so re-rolls always have context.
  • SEO + Meta Management: The Meta tab unlocks four editable fields (Title, Meta Description with 160-char counter, Focus Keyword, Excerpt) with 800ms-debounce auto-save. Each field has a purple AI button that opens a targeted chat-mode banner — describe what you want or send empty to auto-generate, and only the chosen field updates. Auto-syncs to Yoast (_yoast_wpseo_metadesc, _yoast_wpseo_focuskw), Rank Math (rank_math_description, rank_math_focus_keyword), and AIOSEO (_aioseo_description).
  • In-Editor AI Generation (new in 1.6.2): Adds a ✦ Generate with AI button directly inside the WordPress editor — Classic and block — so you can draft field text without leaving the post. It appears on the post excerpt, on a WooCommerce product's short and long description, and on any custom meta-box fields you allowlist. Click to generate a draft grounded in the post's title and context (and, for products, price and category), review and edit it in a popover, then Insert — nothing is saved until you save the post. Configure it under MxChat → Content in the In-Editor AI Generation card: a master enable toggle (on by default) plus a custom-field allowlist (one meta_key or meta_key|Label per line). Uses your configured content model and your own provider key — no separate billing path.
  • Google Search Console Integration: After OAuth, every post shows clicks / impressions / CTR / average position plus a table of top search queries with color-coded rankings (1-10 green, 11-20 yellow, 21+ red). The main SEO table gains clicks and impressions columns synced to post meta for server-side sorting. Data is cached for 6 hours per post; force-refresh on demand. Last 28 days of search activity. Opening the SEO dashboard no longer runs the full Search Console sync inside your page request — it runs in the background in small batches, so the screen stays fast on sites with thousands of posts, with a fallback that keeps the sync moving on hosts where background tasks are disabled. Posts with no Search Console data show a dash rather than a stored zero, and the average position column is color-coded (green for page one, amber for page two, red beyond).
  • Tool-Based Editing: AI editing switches from "rewrite the whole page" to surgical str_replace tool calls — the AI finds and replaces only the specific text you asked about. Faster, fewer tokens, and avoids accidentally altering unrelated content. Multi-part edits run sequentially; a read_content tool lets the model verify state between edits. Capped at 30 iterations per edit. Falls back to full rewrite when disabled or for unsupported models.
  • AI SEO Optimization: One-click actions on any post from the SEO panel — Readability (rewrites for shorter sentences, simpler words, active voice while preserving HTML/images/links), Internal Links (inserts contextual links to existing posts), Image ALT Text (fills missing alt attributes), Featured Image (generates and sets one). AI Auto-Optimize runs all enabled checks in batch. Skips Elementor/Divi/WPBakery/Beaver Builder content to avoid corrupting page-builder structures.
  • FAQ Suggestions in the editor (new in 1.6.4): With FAQ Schema Suggestions on and Search Console connected, the post editor sidebar lists the question-style searches the post already appears for, drafts a short answer for each using your configured content model, and inserts the ones you approve as an FAQ block at the end of the post. Every answer is shown for review before it goes in, and nothing is written until you save the post. The block renders as an on-page accordion and also emits FAQPage schema. Note on expectations: Google retired FAQ rich results for all sites in May 2026, so treat this as a way to answer real searcher questions on the page — not as a route to expanded SERP listings. The in-product description still frames it as the latter; the on-page value is the reason to use it.
  • FAQ Coverage table (new in 1.6.4): A read-only triage table under MxChat → Content → SEO listing your top pages by search impressions with clicks, CTR, average position, question count, and whether the post already has an FAQ block. Three filter chips narrow it to the pages most worth the work — Page 1 only, Zero clicks, and Missing FAQ block — and each row jumps straight into the editor with the suggestions panel. The Questions column fills in for every row from one site-wide Search Console fetch (refreshed every 6 hours) rather than only for posts you've already opened.
  • Weekly damage scan (new in 1.6.4): A weekly background scan checks generated posts for truncated endings and leaked generator data, then raises a dismissible admin notice listing the affected posts with direct edit links. Dismissing it remembers the current result — the notice only comes back when the scan finds something new, so it never nags about the same posts twice. Sites with background tasks disabled get the same check on admin visits instead. Nothing is ever repaired automatically by the scan; it only reports. The scan-truncations tool is where repairs happen, and only the leaked-generator-data case can be auto-fixed (that repair is deterministic) — mid-sentence cut-offs are always reported for a human to finish.
  • Bearer-token REST API: A POST /wp-json/mxchat-adv/v1/generate-content endpoint runs the full generator pipeline (body, images, internal linking, meta, focus keyword) synchronously and returns the post details — designed for AI agents, n8n / Zapier / Make, and CI pipelines that need to publish without an admin session. Defaults post_status to draft for safety; also supports publish and future with schedule_date.

API & Integration

REST Endpoints

Namespace: mxchat-adv/v1.

  • GET /wp-json/mxchat-adv/v1/health — No auth. Returns { ok, token_configured, core_generator_loaded, plugin_version }. Use this for connectivity checks before firing a generation request.
  • POST /wp-json/mxchat-adv/v1/generate-content — Bearer-token auth. Runs full content generation synchronously. Returns { success, post_id, post_url, edit_url, post_title, post_status, images, meta, progress_key }.

Authentication

Single shared secret stored in the mxchat_adv_api_token WordPress option. No admin UI — manage via WP-CLI. Set initially or rotate with:

wp option update mxchat_adv_api_token "$(openssl rand -hex 32)"

Rotation is instantaneous (no grace period). Token comparison uses hash_equals() for constant-time safety. Until a token is set, the endpoint returns HTTP 500 with rest_token_unset. Delete the option to disable the endpoint entirely:

wp option delete mxchat_adv_api_token

Request body (JSON)

| Field | Required | Default | Notes |
|---|---|---|---|
| prompt | yes | — | Topic and instructions for the post. |
| post_status | no | draft | draft / publish / future. |
| content_type | no | post | post or page. |
| schedule_date | no | — | YYYY-MM-DD HH:MM:SS (required when post_status=future). |
| layout | no | fullwidth | fullwidth or sidebar. |
| title_display | no | hide | show or hide. |
| template_mode | no | off | on or off. |
| custom_system_prompt | no | — | Override for the system prompt. |

Example:

curl -X POST https://example.com/wp-json/mxchat-adv/v1/generate-content \
  -H "Authorization: Bearer $MXCHAT_ADV_TOKEN" \
  -H "Content-Type: application/json; charset=utf-8" \
  -d @body.json

SEO plugin sync

Detected on plugin load. Sync fires on both manual saves and AI-generated updates.

  • Yoast SEO_yoast_wpseo_metadesc, _yoast_wpseo_focuskw
  • Rank Mathrank_math_description, rank_math_focus_keyword
  • All in One SEO_aioseo_description

If you edit fields directly in Yoast/Rank Math after the add-on syncs them, your manual edits win — sync only happens when you save or generate through the Content Generator.

WordPress filter

mxchat_content_pro_feature — the add-on hooks this filter to unlock pro features in the Content Generator UI. Unlocked feature keys: internal_linking, image_management, meta_management, tool_use, seo_readability, seo_internal_links, seo_img_alt, seo_featured_img, gsc_integration, content_calendar, template_generator.

Requirements

  • MxChat (mxchat-basic): Required and active. Free on WordPress.org.
  • MxChat Pro License: Required. Without an active license the add-on loads only the admin notice. See /pricing/.
  • WordPress: 5.0 or newer.
  • PHP: 7.2 or newer.
  • Google Search Console OAuth: Required only for the GSC integration feature. Uses Google account auth via Firebase Cloud Function proxy.
  • AI provider API key: An OpenAI / Anthropic / Google / xAI key configured in core MxChat settings drives all AI features (body, meta, editing, SEO optimization, image generation).
  • WP-CLI (optional): Needed to set the REST API bearer token. Direct DB option-table edits also work.

Troubleshooting

Image generation fails or hangs

Open Tools → Site Health → Info and verify your AI provider key is set and not rate-limited. The image model is configured separately from the content model in MxChat → Content → Settings. If using OpenAI GPT Image 1.5, your key must have image-generation access enabled in the OpenAI dashboard. If posts hang at "generating images", your hosting may be killing the PHP request before generation finishes — set set_time_limit(300) is already applied by the REST path, but admin-AJAX paths are limited by your server's max_execution_time.

Image regenerate button does nothing

The Image Manager attaches via a MutationObserver to the image grid. If you've heavily customized the admin styling, the .mxg- class prefixes may have been stripped. Open the browser console — a missing observer logs MxChat: image grid container not found. Clear any page-builder admin overrides on the Content page.

Google Search Console connection succeeds but no data appears

Confirm you selected the correct property after OAuth (the property selector appears after redirect — easy to miss). Visit MxChat → Content → Settings and confirm the connected property matches the site domain. If it does, click the refresh button in the per-post SEO panel — data is cached for 6 hours, and fresh OAuth doesn't auto-prime the cache.

"Invalid grant" or "redirect_uri mismatch" during GSC OAuth

The OAuth proxy runs on a Firebase Cloud Function with a fixed redirect URL. If you're behind a corporate firewall blocking *.cloudfunctions.net, OAuth will fail mid-flow. Try from a different network, or contact support to whitelist the proxy endpoint.

REST endpoint returns rest_token_unset

The mxchat_adv_api_token option is empty. Set it via WP-CLI: wp option update mxchat_adv_api_token "$(openssl rand -hex 32)". There is no admin UI for this — by design, to keep the token out of any settings page or audit log.

REST endpoint returns HTTP 524 even though the post was created

Cloudflare on Free/Pro plans severs proxied connections at 100 seconds. Image-heavy posts often take 100-180s. The post still gets created server-side. Two workarounds: (1) bypass Cloudflare for that one request using curl's --resolve flag, or (2) look up the most recent draft after a 524 with wp post list --post_status=draft --orderby=date --order=desc --posts_per_page=1 and don't re-fire (you'll duplicate).

REST JSON body rejected as malformed UTF-8

WordPress's REST parser rejects curly quotes and non-UTF-8 em-dashes. Always send Content-Type: application/json; charset=utf-8 and write the body to a file (-d @body.json) instead of inlining on the shell to dodge quoting issues.

Bulk CSV generation invents {date} or {year} placeholders

Fixed in 1.5.1 — AI bulk mode now restricts placeholders to CSV headers only. If you're on an older version, upgrade. The free Content Generator does not have this guard.

The FAQ Suggestions panel is empty, or the FAQ Coverage table isn't there

Both surfaces need two things: FAQ Schema Suggestions switched on in settings, and Google Search Console connected. With the setting off, neither loads at all. With it on but Search Console not connected, the settings card tells you so and the coverage table stays hidden. If both are in place and a specific post still shows nothing, that post has no question-style queries in its last 28 days of Search Console data — there is nothing to suggest from. Posts too new to have accumulated search data are the usual case.

By design. Internal linking only fires for blog posts (post type), not landing pages, since it's a blog SEO strategy. Use the Programmatic SEO templates or AI Auto-Optimize → Internal Links to seed links into landing pages manually.


Last reviewed by Sage on 2026-08-11 — corrected stale admin menu paths (Pro & Extensions, Actions → Trigger Phrases, Settings → Integrations → Toolbar) against core 3.2.18. Spotted an issue? Open a ticket and we'll patch the doc.