Title: Jigar Patel Post Content Summary With AI
Author: Jigar Patel
Published: <strong>July 21, 2026</strong>
Last modified: July 21, 2026

---

Search plugins

![](https://s.w.org/plugins/geopattern-icon/jigar-patel-post-content-summary-with-
ai.svg)

# Jigar Patel Post Content Summary With AI

 By [Jigar Patel](https://profiles.wordpress.org/indiajigar/)

[Download](https://downloads.wordpress.org/plugin/jigar-patel-post-content-summary-with-ai.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/jigar-patel-post-content-summary-with-ai/#description)
 * [Reviews](https://wordpress.org/plugins/jigar-patel-post-content-summary-with-ai/#reviews)
 *  [Installation](https://wordpress.org/plugins/jigar-patel-post-content-summary-with-ai/#installation)
 * [Development](https://wordpress.org/plugins/jigar-patel-post-content-summary-with-ai/#developers)

 [Support](https://wordpress.org/support/plugin/jigar-patel-post-content-summary-with-ai/)

## Description

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**

 * One-click AI summary generation from the post editor
 * Editable summary field with a live 200-character counter
 * Works with Anthropic (Claude) or OpenAI — your choice, your API key
 * Summary is stored in `post_meta` (key: `_ai_short_summary`)
 * Automatically displayed above the post content in a styled box — no theme edits
   needed
 * Server-side enforcement of the 200-character limit, even if the field is edited
   manually
 * Nonce-protected AJAX request and standard WordPress capability checks

### How It Works (Step by Step)

 1. **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.
 2. **Open a post**
     Edit any post (new or existing). Below the main content editor
    you’ll see a “Short Summary (AI)” box.
 3. **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.
 4. **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.
 5. **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`.
 6. **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.

### External services

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/

### Data & Privacy Notes

 * Post title and content (up to ~6000 characters) are sent to the configured third-
   party AI provider (Anthropic or OpenAI) when the “Generate Summary With AI” button
   is clicked.
 * No data is sent automatically — generation only happens on explicit button click.
 * Refer to your chosen provider’s privacy policy and terms of service for how they
   handle submitted data.

### Known Limitations

 * Any user with `edit_posts` capability can trigger a billed API call by clicking
   the button. If you have many editors, consider adding rate-limiting.
 * Summary generation is synchronous — the request happens while the editor waits,
   so response time depends on the AI provider’s latency (typically a few seconds).

## Installation

 1. Upload the plugin zip via _Plugins  Add New  Upload Plugin_, or extract it into`/
    wp-content/plugins/jigar-patel-post-content-summary-with-ai/`.
 2. Activate the plugin through the _Plugins_ menu.
 3. Go to _Settings  JP PostSummary With AI_ and enter your API key and provider.
 4. Edit any post and use the “Generate Summary With AI” button in the post editor.

## FAQ

### Which AI providers are supported?

Anthropic (Claude) and OpenAI out of the box. The API-calling logic is isolated 
in two functions (`jppsai_call_anthropic()` and `jppsai_call_openai()`), so adding
another provider just means adding a similar function and a case in `jppsai_call_ai_api()`.

### Where is the summary stored?

In the `wp_postmeta` table, under the meta key `_ai_short_summary`, tied to the 
post ID.

### Does this modify my theme files?

No. The summary box is injected via the `the_content` filter and its styles via `
wp_head`, so it works with any theme without editing template files.

### What happens if the AI-generated summary is longer than 200 characters?

It’s automatically truncated at the nearest word boundary and an ellipsis is appended,
both when displayed in the editor and again server-side when saved, so the stored
value never exceeds the limit.

### Can editors write their own summary instead of using AI?

Yes. The text field is always editable — the AI button is a convenience, not a requirement.

### Does this work for custom post types?

By default it’s enabled for the `post` post type. Other post types can be added 
via the `jppsai_post_types` filter, e.g.:

    ```
    add_filter( 'jppsai_post_types', function( $types ) {
        $types[] = 'news';
        return $types;
    } );
    ```

### Is my API key secure?

It’s stored in the `wp_options` table (via the Settings API) and is never sent to
the browser. Make sure your site runs over HTTPS and that only trusted admins have
access to _Settings  JP PostSummary With AI_.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Jigar Patel Post Content Summary With AI” is open source software. The following
people have contributed to this plugin.

Contributors

 *   [ Jigar Patel ](https://profiles.wordpress.org/indiajigar/)

[Translate “Jigar Patel Post Content Summary With AI” into your language.](https://translate.wordpress.org/projects/wp-plugins/jigar-patel-post-content-summary-with-ai)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/jigar-patel-post-content-summary-with-ai/),
check out the [SVN repository](https://plugins.svn.wordpress.org/jigar-patel-post-content-summary-with-ai/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/jigar-patel-post-content-summary-with-ai/)
by [RSS](https://plugins.trac.wordpress.org/log/jigar-patel-post-content-summary-with-ai/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * Initial release: AI summary generation button, editable field with character 
   counter, post_meta storage, automatic front-end display box, settings page for
   API key/provider.

## Meta

 *  Version **1.0.0**
 *  Last updated **1 day ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.8 or higher **
 *  Tested up to **7.0.2**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [AI](https://wordpress.org/plugins/tags/ai/)[anthropic](https://wordpress.org/plugins/tags/anthropic/)
   [excerpt](https://wordpress.org/plugins/tags/excerpt/)[openai](https://wordpress.org/plugins/tags/openai/)
   [summary](https://wordpress.org/plugins/tags/summary/)
 *  [Advanced View](https://wordpress.org/plugins/jigar-patel-post-content-summary-with-ai/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/jigar-patel-post-content-summary-with-ai/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/jigar-patel-post-content-summary-with-ai/reviews/)

## Contributors

 *   [ Jigar Patel ](https://profiles.wordpress.org/indiajigar/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/jigar-patel-post-content-summary-with-ai/)