JP Post Content Summary With AI adds a “Generate Summary with AI” button to the post editor. One click sends the article content to your chosen AI provider (Anthropic Claude or OpenAI), which returns a short summary (200 characters max). The summary lands in an editable text field so editors can tweak it before publishing. Once the post is saved, the summary is stored in post_meta and automatically prepended to the post content on the front end, inside a rounded, bordered box.
Features
post_meta (key: _ai_short_summary)Configure your API key
Go to Settings JP PostSummary With AI in wp-admin. Choose a provider (Anthropic or OpenAI), paste your API key, and optionally specify a model (defaults: claude-sonnet-4-6 for Anthropic, gpt-4o-mini for OpenAI). Save changes.
Open a post
Edit any post (new or existing). Below the main content editor you’ll see a “Short Summary (AI)” box.
Generate the summary
Click “Generate Summary With AI.” The plugin sends the post’s title and content (up to ~6000 characters) to the configured AI provider via a secure server-side AJAX request (admin-ajax.php, nonce-verified). The AI returns a short summary, which is inserted into the text field below the button.
Review and edit
The summary is fully editable. A live character counter (e.g. “142 / 200”) shows how much room is left, and turns red if you exceed the limit. You can also skip AI generation entirely and type your own summary.
Save/Publish the post
When you click Update or Publish, WordPress’s standard save_post hook fires. The plugin verifies the nonce and your editing capability, sanitizes the text, truncates it to 200 characters at a clean word boundary if needed, and saves it to post_meta under the key _ai_short_summary.
Automatic front-end display
On the single post view, a the_content filter checks for a saved summary. If one exists, it’s wrapped in a <div class="jppsai-summary-box"> — rounded corners, subtle border and shadow — and prepended before the rest of the article content. No template edits are required; this happens automatically via the filter.
This plugin uses the WordPress AI Client, the AI infrastructure built into WordPress core (7.0+), to generate short article summaries. It does not connect to any external service directly or on its own — it works only through whichever AI provider(s) the site administrator has configured under Settings AI Credentials. Depending on that configuration, the plugin’s “Generate Summary by AI” button will cause the post title and content to be sent to one of the following third-party services:
Anthropic (Claude models)
* What it is / what it’s used for: a generative AI service used to produce the short article summary text.
* What data is sent, and when: the post title and up to approximately 6,000 characters of the post content, sent only when an editor clicks the “Generate Summary by AI” button (never automatically or in the background).
* Terms of Service: https://www.anthropic.com/legal/consumer-terms
* Privacy Policy: https://www.anthropic.com/legal/privacy
OpenAI (GPT models)
* What it is / what it’s used for: a generative AI service used to produce the short article summary text.
* What data is sent, and when: the post title and up to approximately 6,000 characters of the post content, sent only when an editor clicks the “Generate Summary by AI” button (never automatically or in the background).
* Terms of Service: https://openai.com/policies/row-terms-of-use/
* Privacy Policy: https://openai.com/policies/row-privacy-policy/
edit_posts capability can trigger a billed API call by clicking the button. If you have many editors, consider adding rate-limiting.