    # Content Plan – User Guide

A quick guide for WordPress site admins and editors on how to use the Content Plan plugin.

---

## 1. Getting Started

### What Content Plan Does

Content Plan helps you:

- Plan and schedule content ideas
- Generate content plans with AI
- Generate full WordPress posts from plan items
- Manage everything in one place (table and calendar views)

### Installation and Activation

1. Install the plugin from the WordPress Plugins screen.
2. Click **Activate**.
3. The plugin creates its own database tables automatically. No manual setup is required.

### First-Time Setup (Onboarding)

The first time you open Content Plan, you’ll see an onboarding screen:

1. **Choose your content goal** – Traffic, Leads, or Authority.
2. **Select your language** – The language your content will be written in.
3. **Optional:** Add custom recommendations (e.g., topics, tone, audience).
4. **Accept the Terms of Use** – Required to continue.
5. Click **Get Started** to generate your first 5 content plan items, or **Skip** to go straight to the dashboard.

### Opt-In for AI Features

To use AI generation and automated tasks, you need to opt in when prompted. The message explains that opting in enables task automation and updates. You can continue without opting in, but automated AI features will be disabled.

---

## 2. Dashboard Overview

After onboarding, you’ll see the main dashboard with three tabs:

| Tab | Purpose |
|-----|---------|
| **Content Plan** | Create, edit, and manage content plan items. Switch between Table and Calendar views. |
| **Settings** | Configure publish interval and post editor format. |
| **Log** | View activity logs (errors, warnings, info). |

### Usage Box

The **Usage** box shows:

- **Tokens Remaining** – How many AI tokens you have left (Free: 20 per 30 days; Pro: 300 per 30 days).
- **Renew Date** – When your tokens reset.
- **Account is blocked** – If your account has been blocked due to policy violations.

### Tutorial Tooltips

New users see short tooltips that highlight:

- Content Plan header
- **Generate AI** button
- **Schedule Manual** button
- Usage box

You can click **Next** to move through them or **Skip** to close. The tutorial won’t show again once you’ve seen it.

---

## 3. Creating and Managing Content Plans

### Manual Creation

1. Click **Schedule Manual** (or the equivalent button in the Content Plan tab).
2. A sidebar opens. Fill in:
   - **Title** – Required.
   - **Structure** – Outline or sections (e.g., intro, subtopics, conclusion).
   - **Keywords** – Optional.
   - **Status** – Draft, Scheduled, Published, etc.
   - **Scheduled Date** – When the post should be published.
   - **Language** – Content language.
3. Click **Save** to create the item.

### Table View vs Calendar View

- **Table View** – List of items with columns (title, status, date, keywords, etc.). Use checkboxes for bulk actions (e.g., delete).
- **Calendar View** – Items shown by date. Useful for seeing your schedule at a glance.

Switch between views using the view toggle in the Content Plan tab.

### Editing and Deleting

- Click a row to open the sidebar and edit the item.
- Use the delete action in the sidebar or select items and use bulk delete.

---

## 4. AI Features

### Generate AI Content Plan

1. Click **Generate AI**.
2. In the modal:
   - Select one or more **goals** (Traffic, Leads, Authority).
   - Set **Total posts** (1–100).
   - Choose **Language**.
   - Optionally add **Custom recommendations**.
3. Click **Generate**.
4. A task is created. It appears in the **Tasks Panel** (usually on the right or in a slide-out). Wait for it to complete.

### Generate Post from a Plan Item

1. Open a content plan item (click it in the table).
2. In the sidebar, click **Generate Post** (or similar).
3. In the modal:
   - Optionally add **Custom instructions** for regeneration.
   - Click **Generate**.
4. The task runs in the background. Check the Tasks Panel for status.
5. When complete, the post is created in WordPress. You can edit it in the usual post editor.

### Regenerating with Custom Instructions

If you want to change the output, use the **Custom instructions** field in the Generate Post modal before generating again.

---

## 5. Tasks Panel and Logs

### Tasks Panel

The Tasks Panel shows background tasks (plan generation, post generation):

| Status | Meaning |
|--------|---------|
| **Queued** | Task is waiting to run. |
| **Processing** | Task is running. |
| **Completed** | Task finished successfully. |
| **Failed** | Task failed. Check the error message. |

- Tasks auto-refresh while they’re running.
- You can filter the content plan by a task to see related items.
- Use **Mark as watched** to dismiss a task from the list.
- For completed post generation, the auto-publish date is shown if configured.

### Log Tab

The **Log** tab shows activity entries with levels:

- **Error** – Something went wrong.
- **Warning** – Potential issues.
- **Info** – General information.
- **Debug** – Technical details (for troubleshooting).

Check the Log when something fails or behaves unexpectedly.

---

## 6. Settings

### Publish Interval (Days)

- Defines how often posts are published (e.g., every 7 days).
- If you change this, a **Recalculate Schedule** modal may appear.
- It shows how many items will be affected. Confirm to recalculate scheduled dates.

### Post Editor

Choose how generated posts are saved:

- **Auto** – Detects the editor used on your site.
- **Gutenberg** – Block editor.
- **Elementor** – Elementor editor.
- **Classic** – Classic editor.

---

## 7. Troubleshooting

### “Houston, we have a connection problem”

- The plugin can’t reach the backend service.
- **What to do:** Wait a few minutes and try again. If it persists, contact your site administrator or support.

### Tokens Remaining is 0 or Very Low

- Your AI token allowance is used up.
- **What to do:** Wait until the **Renew Date** for tokens to reset, or upgrade to Pro for more tokens.

### Account is Blocked

- Your account has been blocked due to content policy violations (e.g., moderation).
- **What to do:** Contact support. Unblocking is handled by the service provider.

### Task Failed

- A generation task failed.
- **What to do:**
  1. Read the error message in the Tasks Panel.
  2. If it mentions **moderation** or **blocked**, your content may have triggered a policy check. Try different content or contact support.
  3. For other errors, try again. If it keeps failing, check the Log tab and contact support with the error details.

### Generation Modal Shows “Please opt in”

- AI features require opting in.
- **What to do:** Use the opt-in link or button shown in the prompt to enable automated features.

---

## 8. Technical Handoff (For Site Administrators)

If you need to hand off setup or maintenance to a technical person:

- The plugin talks to an external API for AI generation and usage tracking.
- The API requires: PostgreSQL database, Node.js 18+, and environment variables (`DATABASE_URL`, `FREEMIUS_API_KEY`, `OPENAI_API_KEY`).
- Token limits: Free 20 / Pro 300 per 30 days.
- Content is moderated; severe violations can block the account.
- Full API setup details are in the `contentplan-api` repository README.

---

*Last updated for Content Plan plugin v1.0.14*
