Generate WordPress Posts with Claude Sonnet (Anthropic)

Are you looking for a way to write WordPress posts with Claude Sonnet AI? In this tutorial, we will show you how to bulk generate WordPress posts using Claude (Anthropic). You’ll learn how to generate posts from scratch or generate post content based on the post title.

The best thing is that you will be able to generate WordPress posts for your blog using generative AI directly in the WordPress dashboard. You can use any AI model, but in this example we are going to use Claude Sonnet AI (Anthropic).

Tools to generate WordPress posts with Claude Sonnet

Here are the tools you need in order to write WordPress posts using Claude Sonnet AI by Anthropic:

1- WP Sheet Editor – Post Types

This plugin allows you to view and manage WordPress posts, pages, and custom post types in a spreadsheet interface on the WordPress dashboard.

You can skip this step if you already have the plugin.

2- WP Sheet Editor – AI

It’s a AI assistant service that allows you to connect with different AI providers and LLMs. You can integrate the use of artificial intelligence in all spreadsheets of the WP Sheet Editor suite.

3- OpenRouter API

The AI functionality in WP Sheet Editor relies on an external API like OpenAI, OpenRouter, etc.

WP Sheet Editor – AI works perfectly with OpenAI and other providers that use the same format as OpenAI.

But to use the Claude Sonnet models, you need an OpenRouter API (more info here).

To set up Claude Sonnet for generating posts, you need to follow these steps:

  1. On your WordPress dashboard, go to WP Sheet Editor > AI > Settings > Settings.
  2. Provider: OpenRouter
  3. Model Key: In this example, we will use Claude 3.7, so we need to add this: anthropic/claude-3.7-sonnet
  4. API Name: openrouter – anthropic/claude-3.7-sonnet
  5. API Key: Add your OpenRouter API key here.
  6. Model Context Lenght: Context length is the maximum amount of tokens that you want to send to the model in a request, this includes the past messages in a chat or the row context when you edit in the sheet. The higher context length, the more expensive your API usage will be.
  7. What is the purpose of this model: You can select any of these options:
    • Chat
    • Add new rows with AI
    • Cell editions
    • Bulk Edit
  8. Save the changes.

wordpress generate posts with claude sonnet by anthropic

Prompt for generating post with Claude

Here’s a prompt you can use to generate post content based on the post title with Claude or other AI models. Make sure you test and customize the prompt so that it fits your needs.

If you’re using Gutenberg editor, use this prompt:

Write a blog post based on the title $Title$, starting with an engaging introductory paragraph without using a heading tag. Ensure the content is SEO-optimized, engaging, and properly formatted using valid Gutenberg block syntax for WordPress. Structure the content with <p> tags inside <!-- wp:paragraph --> blocks for paragraphs, use <!-- wp:heading {"level":2} --> for <h2> headings (adjusting levels as needed), and format lists with <!-- wp:list --> blocks containing <ul> or <ol>. Avoid using overarching tags like <html> or <body>, as they are unnecessary. The content should be ready for direct insertion into WordPress and fully compatible with the Gutenberg editor.

If you’re using classic editor, use this prompt:

Write a blog post based on the title {Title}, starting with an engaging introductory paragraph without using a heading tag. Ensure the content is SEO-optimized, engaging, and formatted with clean HTML for direct insertion into the WordPress Classic Editor. Structure the content using the following HTML elements: wrap paragraphs in <p> tags, use <h2> for main headings and <h3> (or other levels) for subheadings, and format lists with <ul> and <ol> for unordered and ordered lists, respectively. Avoid using <html>, <body>, <header>, or <footer> tags, as WordPress handles these automatically.

Optional: Use save it as global prompt

With WP Sheet Editor – AI, you can create a bank of global prompts that you can use in WP Sheet Editor spreadsheets. This is great because when you want to use a specific prompt, you won’t have to type it in full, but you could use a simple shortcut like ai:write-post, ai:summarize-post, etc.

You can learn more about global prompts here.

Here’s how you can create and save a global prompt for generating posts with Claude:

Go to WP Sheet Editor > AI > Settings > Prompts.

Once there, click on Add new to create a new prompt.

Add the prompt Name and Prompt text, and click on Save.

wordpress generate posts with claude sonnet by anthropic

After saving the changes, you’ll see the newly generated slug, which you can now use to run this prompt in WP Sheet Editor.

If you’ll use this prompt in spreadsheet cells, you can type ai:write-post, for example, in order to use the prompt you’ve just created.

generate-wordpress-posts-claude-sonnet-anthropic

Open the WordPress posts spreadsheet

Go to WP Sheet Editor > Edit posts to open the WordPress posts spreadsheet.

Method 1: Generate posts with Claude from scratch

With WP Sheet Editor – AI, you can create complete posts from scratch. You can generate content for multiple posts and multiple fields.

For example, you can write posts for a specific topic and generate title, post content, post excerpt, SEO title, SEO description and any other field.

To write complete posts with Claude, you need to start by hovering the mouse over Add new and select Add rows with AI.

wordpress generate posts with claude sonnet by anthropic

Now you need to select how many posts you want to create, the fields you will autofill with AI, the prompt, etc.

Here’w how you can do it:

  • How many rows do you want to add: Enter the number of posts you want to create with Cluaude Sonnet AI.
  • What columns do you want to auto fill with the AI: You can select all the fields for which you want to generate AI content. In this example, we will generate three fields:
    • Title
    • Content
    • Excerpt
  • Prompt: Enter the prompt you will use to generate WordPress posts with claude. Here’s an example:
Write blog posts on productivity, each starting with an engaging introduction that explains the importance of the topic. Cover practical strategies, scientific insights, and real-life examples to help readers improve their productivity. Structure the content using valid Gutenberg block syntax for WordPress, with <!-- wp:paragraph --> for paragraphs, <!-- wp:heading {"level":2} --> for <h2> headings (adjusting levels as needed), and <!-- wp:list --> blocks for unordered and ordered lists. Ensure each post is clear, actionable, and engaging, providing real value without unnecessary filler.
  • Do you want to set default values for the other columns: You can set default categories, default status, etc., for all the posts you will generate.
  • Click on Create the rows.

wordpress generate posts with claude sonnet by anthropic

After the request is complete, you’ll see the new posts in the spreadsheet. Now you can make any changes you want using the spreadsheet before publishing the posts to your blog.

wordpress generate posts with claude sonnet by anthropic

This is a great way to write WordPress posts with AI. But there’s more!

Method 2: Generate post content based on post title

Another great option is to generate content for different fields based on the post title. For example, let’s imagine you have a list of posts you would like to write and publish on your blog. However, you don’t have the time to get down to writing, nor do you want to hire someone to write the posts for you. Nor is your creativity at its best.

Here you can see the list of post titles. We have already created the entries, but only with titles.

generate-wordpress-posts-claude-sonnet-anthropic

In this case, WP Sheet Editor – AI with Claude Sonnet AI can be your greatest companion, as you can create post content based on the post title. We will show you at least three options to do that.

Option 1: Generate post content in the spreadsheet

Let’s generate post content. To do this, we need to go to the Content column and add the AI prompt we will use to generate the content.

You have two options:

  1. You can use a full prompt. Just type ai: followed by the full prompt.
  2. You can use a global prompt shortcut. Just type ai:prompt-slug, replacing “prompt-slug” with the actual slug of your pre-saved global prompt. In this example, we will use ai:write-post to run the prompt we saved as global prompt above.

wordpress generate posts with claude sonnet by anthropic

Once you hit Enter, Claude will start generating the post content based on the title. You’ll see a loading icon in the cell while the request is processing.

wordpress generate posts with claude sonnet by anthropic

As you can see, we have generated our first post.

generate-wordpress-posts-claude-sonnet-anthropic

If we go go the cell and click on Edit, we will be able to edit the post using the text editor in a popup.

generate-wordpress-posts-claude-sonnet-anthropic

You can also paste the same prompt or prompt shortcut in multiple cells to generate content for multiple fields at once.

wordpress generate posts with claude sonnet by anthropic

As you can see in the screenshot below, we’re running multiple requests at once.

wordpress generate posts with claude sonnet by anthropic

Once the posts have been written, you can click on Save changes.

generate-wordpress-posts-claude-sonnet-anthropic

Option 2: Generate post content in TinyMCE editors

If you want to have even more control over the writing process, you can generate content for posts individually and directly in the spreadsheet.

This works ff you’re using the classic editor. Just go to the Content column, click on Edit in a specific cell/post, and click on Edit with AI.

wordpress generate posts with claude sonnet by anthropic

Now you need to add the prompt text in the Prompt field and click on Generate.

wordpress generate posts with claude sonnet by anthropic

Claude will start working and generating the content. Within some seconds, your post content will be written and you can make all the changes you want before saving the changes and pubishing your post on the blog.

wordpress generate posts with claude sonnet by anthropic

Option 3: Bulk generate post content with Claude

Let’s see now how to generate posts in bulk using Claude Sonnet AI. WP Sheet Editor – AI allows you to edit many posts in bulk thanks to its Bulk AI API, which reduces times when it comes to processing AI requests.

In this example, we will search for the posts missing content and generate content for all at once.

Let’s start by opening the Search tool.

generate-wordpress-posts-claude-sonnet-anthropic

Now select these values to search for all posts missing content:

  • Tick the Enable advanced filters checkbox.
  • Field: Content
  • Operator: =
  • Value: Leave this field empty.
  • Click on Run search.

wordpress generate posts with claude sonnet by anthropic

After filtering all the posts missing content, you need to open the Bulk Edit tool.

generate-wordpress-posts-claude-sonnet-anthropic

And you need to select these values in order to have Anthropic’s Claude Sonnet AI write your posts:

  • Select the rows that you want to update: Edit all the rows from my current search.
  • What field do you want to edit: Content
  • Select type of edit: Here you have two options:
    • First option: You can select a pre-saved global prompt. For example, we will select our pre-saved post content prompt, displayed as AI command: Write post. This way, you don’t have to type the prompt.
    • Second option: You can select AI Prompt, and you can paste or type the full prompt.
  • AI Provider: In this example, we will use Antropic’s Claude 3.7.
  • You can click on Show preview to see the result before saving the changes.
  • Now you can click on Execute Now.

wordpress generate posts with claude sonnet by anthropic

These three options to generate post content based on the post title will help you save a lot of time and write great blog posts with Claude Sonnet AI.

Optional: Generate post excerpts with Claude

You can automatically generate post excerpts with Claude Sonnet AI by using a simple prompt like this:

Summarize the $Content$ in 30 words.

You can save it as a global prompt, or add it in spreadsheet cells like this:

ai:summarize the $Content$ in 30 words.

Of course, you can change the number of words, or use sentences instead of words.

Optional: Generate featured images with AI

WP Sheet Editor – AI allows you to generate featured images for your posts using OpenAI’s image generation models.

Here’s a tutorial where you can learn how to generate post images.

Do you need help?

You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.