Index of /rel/released/software/own/WP-chat-bot-for-claude

Icon  Name                          Last modified      Size  Description
[PARENTDIR] Parent Directory - [   ] chat-bot-for-claude-2.5.3.zip 2026-10-08 19:21 127K [TXT] README.html 2026-10-08 19:21 14K make-core [TXT] README.md 2026-10-08 19:21 9.9K [   ] README.org 2026-10-08 19:21 10K [TXT] readme.txt 2026-10-08 16:58 5.7K
make-core

Chat Bot For Claude (WordPress Plugin)

version

WordPress

Integrate the Claude AI chat interface into your WordPress website using a simple shortcode.


Claude Models

When the Settings page is displayed, the Model list is read from the Models API (https://platform.claude.com/docs/en/api/models/list), newest to oldest, using the saved API Key. If there is no API Key, or the API call fails, only the saved model is listed, with a note to enter or check the API Key.

Currently (as of 2026) it looks like the Claude models are valid for at least a year. If the chat bot stops working, visit the admin page to see a refreshed list of models. You can look for deprecated models at: Model Deprecations. Also you will want to look at the pricing page for the models.


Features


Install Zip File

  1. Download the latest zip file from the "release" directory at: WP-chat-bot-for-claude
  2. With the WP plugin admin page, click on "Add Plugin", click on "Upload Plugin"
  3. Browse to the zip file and select it, open, click on "Install Now"
  4. Activate the plugin.
  5. Navigate to 'Settings' > 'Claude Chat' to configure your API settings, and save.
  6. See the "Admin Configuration" section for more.

Build/Install

Source: https://github.com/TurtleEngr/WP-chat-bot-for-claude

  1. Clone (or fork) this repo.
  2. Or click on the latest "tag," select the "Source code" link to download the zip file, then unzip the file.
  3. Run "make build" to build and create the zip package.
  4. Install dist/chat-bot-for-claude-VER.zip plugin, with the above Install Zip File directions.

Usage

To display the chat interface on any page or post, use the shortcode:

[claude_chat]

On the page or post, you will want to add some directions around the chat area. See example-settings.org for an example page.


Admin Configuration

Go to 'Settings' > 'Claude Chat' in the WordPress admin panel to configure the following options:

The chat log is in the chat-bot-for-claude-log directory, one level above the WordPress root (for example, above public_html), so it cannot be read from the web. Errors are written to the PHP error log with error_log().

See example-settings.org file for a example prompt.


Code Customization

Constants

These internal constants can be changed. The defaults values are shown here. Also, some of these values will be shown in the Claude Chat Settings admin form.

Prefix Prompt

Registered in cb4cfRegisterSettings() with sanitize_textarea_field as its sanitize callback (multi-line safe).

Added at the bottom of the settings form via cb4c_fSettingsInit(). It uses cb4c_fTextareaFieldCallback() that renders a <textarea> (6 rows × 60 cols) with a description explaining the caching behavior. Leaving it blank disables the feature entirely.

prefix + cache_control - cb4c_fApiRequest()

When a prefix is saved, it is sent in the system parameter, separate from the user message. Pre-fetched page text is added as a second system block.

The cache_control: ephemeral setting on the last system block tells Anthropic's API to cache the system prompt across repeated requests — reducing latency and token cost for long prompts. The anthropic-beta: prompt-caching-2024-07-31 header is added automatically.

js or css

js/chat-bot-for-claude.js — The JavaScript only handles the chat UI: capturing the user's input, sending it to admin-ajax.php via AJAX, and displaying the response. None of that flow changed. The prefix prompt is added (and stripped) entirely on the PHP/server side, invisibly to the JS layer.

css/chat-bot-for-claude.css — The new Prefix Prompt field in the admin settings form uses standard WordPress admin classes (large-text, code, description) that are already styled by WordPress core. No custom CSS is needed.


Requirements

Screenshots

Public View

Claude User View

Settings

claude admin view

Support

For support, feature requests, or to report issues, please open an Issue on the GitHub repository.


License

This plugin is licensed under the GPLv2 license.


TurtleEngr


Note

This code was initially derived from: VolkanSah/WP-Claude-Interface