wp-mcp-gateway 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wp-mcp-gateway",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "MCP server for managing WordPress content from Claude Desktop — create posts, upload images, manage SEO, and publish without ever opening WordPress.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
16
|
"dev": "tsx src/index.ts",
|
|
17
|
-
"build": "tsc -p tsconfig.json && cp -r src/guides dist/guides",
|
|
17
|
+
"build": "tsc -p tsconfig.json && rm -rf dist/guides && cp -r src/guides dist/guides",
|
|
18
18
|
"start": "node dist/index.js",
|
|
19
19
|
"test": "vitest run",
|
|
20
20
|
"test:watch": "vitest",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
"node": ">=18.0.0"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
43
|
+
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
44
44
|
"dotenv": "^17.3.1",
|
|
45
45
|
"markdown-it": "^14.1.1",
|
|
46
|
-
"zod": "^3.
|
|
46
|
+
"zod": "^3.25.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/markdown-it": "^14.1.2",
|
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
# Generic WordPress Content Format Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
For standard WordPress sites without custom shortcodes, use plain HTML or Gutenberg block markup. No special theme-specific shortcuts—just semantic HTML.
|
|
5
|
-
|
|
6
|
-
## Content Formats Supported
|
|
7
|
-
|
|
8
|
-
### Option 1: HTML (Recommended for Simplicity)
|
|
9
|
-
```html
|
|
10
|
-
<p>Regular paragraph text.</p>
|
|
11
|
-
|
|
12
|
-
<h2>Heading</h2>
|
|
13
|
-
|
|
14
|
-
<p>More paragraph text with <strong>bold</strong> and <em>italic</em>.</p>
|
|
15
|
-
|
|
16
|
-
<ul>
|
|
17
|
-
<li>List item 1</li>
|
|
18
|
-
<li>List item 2</li>
|
|
19
|
-
</ul>
|
|
20
|
-
|
|
21
|
-
<img src="https://..." alt="Image description">
|
|
22
|
-
|
|
23
|
-
<a href="https://...">Link text</a>
|
|
24
|
-
|
|
25
|
-
<blockquote>Quote text</blockquote>
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Use `content_format: "html"` with this approach.
|
|
29
|
-
|
|
30
|
-
### Option 2: Markdown (Auto-Converted to HTML)
|
|
31
|
-
```markdown
|
|
32
|
-
# Heading 1
|
|
33
|
-
|
|
34
|
-
## Heading 2
|
|
35
|
-
|
|
36
|
-
Regular paragraph text with **bold** and *italic*.
|
|
37
|
-
|
|
38
|
-
- List item 1
|
|
39
|
-
- List item 2
|
|
40
|
-
|
|
41
|
-
[Link text](https://...)
|
|
42
|
-
|
|
43
|
-
> Blockquote text
|
|
44
|
-
|
|
45
|
-

|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Use `content_format: "markdown"` with this approach.
|
|
49
|
-
|
|
50
|
-
### Option 3: Gutenberg Block Markup
|
|
51
|
-
```html
|
|
52
|
-
<!-- wp:paragraph -->
|
|
53
|
-
<p>Paragraph content</p>
|
|
54
|
-
<!-- /wp:paragraph -->
|
|
55
|
-
|
|
56
|
-
<!-- wp:heading {"level":2} -->
|
|
57
|
-
<h2>Heading</h2>
|
|
58
|
-
<!-- /wp:heading -->
|
|
59
|
-
|
|
60
|
-
<!-- wp:image {"id":123,"sizeSlug":"large"} -->
|
|
61
|
-
<figure class="wp-block-image size-large">
|
|
62
|
-
<img src="https://..." alt=""/>
|
|
63
|
-
</figure>
|
|
64
|
-
<!-- /wp:image -->
|
|
65
|
-
|
|
66
|
-
<!-- wp:list -->
|
|
67
|
-
<ul>
|
|
68
|
-
<li>Item 1</li>
|
|
69
|
-
<li>Item 2</li>
|
|
70
|
-
</ul>
|
|
71
|
-
<!-- /wp:list -->
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Use `content_format: "html"` with this approach.
|
|
75
|
-
|
|
76
|
-
## Common HTML Elements
|
|
77
|
-
|
|
78
|
-
### Headings
|
|
79
|
-
```html
|
|
80
|
-
<h1>Page Title</h1>
|
|
81
|
-
<h2>Section Heading</h2>
|
|
82
|
-
<h3>Subsection</h3>
|
|
83
|
-
<h4>Small Heading</h4>
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Text Formatting
|
|
87
|
-
```html
|
|
88
|
-
<p>Regular paragraph.</p>
|
|
89
|
-
<strong>Bold text</strong>
|
|
90
|
-
<em>Italic text</em>
|
|
91
|
-
<u>Underlined text</u>
|
|
92
|
-
<code>Code snippet</code>
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
### Lists
|
|
96
|
-
```html
|
|
97
|
-
<ul>
|
|
98
|
-
<li>Unordered item 1</li>
|
|
99
|
-
<li>Unordered item 2</li>
|
|
100
|
-
</ul>
|
|
101
|
-
|
|
102
|
-
<ol>
|
|
103
|
-
<li>Ordered item 1</li>
|
|
104
|
-
<li>Ordered item 2</li>
|
|
105
|
-
</ol>
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Images
|
|
109
|
-
```html
|
|
110
|
-
<img src="https://example.com/image.jpg" alt="Image description">
|
|
111
|
-
|
|
112
|
-
<!-- Or with figure element -->
|
|
113
|
-
<figure>
|
|
114
|
-
<img src="https://example.com/image.jpg" alt="">
|
|
115
|
-
<figcaption>Optional image caption</figcaption>
|
|
116
|
-
</figure>
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### Links
|
|
120
|
-
```html
|
|
121
|
-
<a href="https://example.com">Link text</a>
|
|
122
|
-
<a href="https://example.com" target="_blank">External link</a>
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
### Blockquote
|
|
126
|
-
```html
|
|
127
|
-
<blockquote>
|
|
128
|
-
<p>Quote text here</p>
|
|
129
|
-
<cite>— Author Name</cite>
|
|
130
|
-
</blockquote>
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Separator/Divider
|
|
134
|
-
```html
|
|
135
|
-
<hr>
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
## Image Workflow
|
|
139
|
-
|
|
140
|
-
### Selecting images from the media library
|
|
141
|
-
1. Call `wp_search_media` with relevant keywords
|
|
142
|
-
2. **Display the thumbnail URLs visually** — show the images inline so the user can see their options
|
|
143
|
-
3. Present as numbered choices with titles and dimensions
|
|
144
|
-
4. The user picks by number, or drops a new image into the chat
|
|
145
|
-
|
|
146
|
-
### Uploading new images
|
|
147
|
-
- **User drops image in chat**: Read the file, base64-encode it, call `wp_upload_media`
|
|
148
|
-
- **Image at a URL**: Call `wp_upload_media_from_url` (server-side download)
|
|
149
|
-
- Use the returned source_url in `<img src="RETURNED_URL" alt="description">`
|
|
150
|
-
|
|
151
|
-
### Featured image
|
|
152
|
-
- Call `wp_set_featured_image` with the media ID (separate from inline content images)
|
|
153
|
-
|
|
154
|
-
## Simple Content Template
|
|
155
|
-
|
|
156
|
-
```html
|
|
157
|
-
<h1>Post Title</h1>
|
|
158
|
-
|
|
159
|
-
<p>Opening paragraph introducing the topic.</p>
|
|
160
|
-
|
|
161
|
-
<h2>First Section</h2>
|
|
162
|
-
|
|
163
|
-
<p>Section content goes here. Use natural paragraphs.</p>
|
|
164
|
-
|
|
165
|
-
<img src="https://..." alt="Relevant image">
|
|
166
|
-
|
|
167
|
-
<h2>Second Section</h2>
|
|
168
|
-
|
|
169
|
-
<p>More content.</p>
|
|
170
|
-
|
|
171
|
-
<ul>
|
|
172
|
-
<li>Key point 1</li>
|
|
173
|
-
<li>Key point 2</li>
|
|
174
|
-
<li>Key point 3</li>
|
|
175
|
-
</ul>
|
|
176
|
-
|
|
177
|
-
<h2>Conclusion</h2>
|
|
178
|
-
|
|
179
|
-
<p>Closing thoughts.</p>
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
## Content Format Selection
|
|
183
|
-
|
|
184
|
-
- **`content_format: "html"`** — Use for HTML, Gutenberg blocks, or mixed content
|
|
185
|
-
- **`content_format: "markdown"`** — Use for markdown-formatted content (will auto-convert to HTML)
|
|
186
|
-
- **`content_format: "auto"`** — WordPress auto-detects format (usually works fine)
|
|
187
|
-
|
|
188
|
-
## Pro Tips
|
|
189
|
-
|
|
190
|
-
- **Keep it semantic**: Use proper HTML tags (h1-h6 for headings, p for paragraphs, etc.)
|
|
191
|
-
- **Alt text required**: Always include `alt` attribute on images for accessibility
|
|
192
|
-
- **Link target**: Use `target="_blank"` for external links only
|
|
193
|
-
- **No inline styles**: Let WordPress/theme handle styling via CSS classes
|
|
194
|
-
- **Use lists**: Break up text with lists for readability
|
|
195
|
-
- **Short paragraphs**: 2-4 sentences per paragraph is ideal for web reading
|
|
196
|
-
|
|
197
|
-
## When to Use Custom Theme Guides
|
|
198
|
-
|
|
199
|
-
If the WordPress site uses:
|
|
200
|
-
- **XMPro + Flatsome theme** → Use `xmpro-post-guide.md` or `xmpro-page-guide.md`
|
|
201
|
-
- **Custom shortcodes** → Ask the user for theme/plugin documentation
|
|
202
|
-
- **Gutenberg patterns** → This generic guide works fine
|
|
203
|
-
|
|
204
|
-
Otherwise, this generic HTML approach works for any WordPress site.
|
|
@@ -1,342 +0,0 @@
|
|
|
1
|
-
# XMPro Page Format Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
XMPro pages using Flatsome are **layout-driven**. Nearly the entire page is built with shortcodes organized in a strict hierarchy: sections contain rows, rows contain columns, columns contain content.
|
|
5
|
-
|
|
6
|
-
**Critical:** Use `content_format: "html"` for all pages with shortcodes.
|
|
7
|
-
|
|
8
|
-
## Layout Hierarchy
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
[section] ← Full-width container with background, padding, video/parallax
|
|
12
|
-
↓
|
|
13
|
-
[row] ← Horizontal grid container
|
|
14
|
-
↓
|
|
15
|
-
[col] ← Column (width controlled by span)
|
|
16
|
-
↓
|
|
17
|
-
[Content blocks: text, images, buttons, etc.]
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Nested layouts use `[row_inner]` and `[col_inner]` inside columns.
|
|
21
|
-
|
|
22
|
-
## Core Section Types
|
|
23
|
-
|
|
24
|
-
### Hero Section with Video Background
|
|
25
|
-
```
|
|
26
|
-
[section bg_overlay="rgba(0,57,82,0.657)" dark="true" padding="140px" video_mp4="https://..." video_webm="https://..." video_visibility="visible"]
|
|
27
|
-
[row v_align="middle" h_align="center"]
|
|
28
|
-
[col span="6" span__sm="12"]
|
|
29
|
-
[ux_text font_size="2.5" line_height="1.5" text_align="center"]
|
|
30
|
-
<h1>Hero Headline</h1>
|
|
31
|
-
<p>Hero subtitle text</p>
|
|
32
|
-
[/ux_text]
|
|
33
|
-
[/col]
|
|
34
|
-
[/row]
|
|
35
|
-
[/section]
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Parameters:**
|
|
39
|
-
- `bg_overlay`: RGBA color overlay (brand dark blue: `rgba(0,57,82,0.657)`)
|
|
40
|
-
- `dark`: "true" for dark text overlay
|
|
41
|
-
- `padding`: "140px" (hero sections typically generous padding)
|
|
42
|
-
- `video_mp4`: Full URL to MP4 video file
|
|
43
|
-
- `video_webm`: Full URL to WebM video file (fallback)
|
|
44
|
-
- `video_visibility`: "visible" to show video background
|
|
45
|
-
|
|
46
|
-
### Parallax Background Section
|
|
47
|
-
```
|
|
48
|
-
[section bg="MEDIA_ID" bg_size="original" bg_overlay="rgba(0,57,82,0.669)" parallax="3" padding="101px"]
|
|
49
|
-
[row]
|
|
50
|
-
[col span="8" span__sm="12"]
|
|
51
|
-
Content here
|
|
52
|
-
[/col]
|
|
53
|
-
[/row]
|
|
54
|
-
[/section]
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
**Parameters:**
|
|
58
|
-
- `bg`: Media ID for background image
|
|
59
|
-
- `bg_size`: "original", "cover", "contain"
|
|
60
|
-
- `bg_overlay`: RGBA overlay
|
|
61
|
-
- `parallax`: Depth value (1-10, higher = more dramatic)
|
|
62
|
-
- `padding`: Vertical padding
|
|
63
|
-
|
|
64
|
-
### Solid Color Section
|
|
65
|
-
```
|
|
66
|
-
[section bg="rgb(246,246,246)" padding="60px"]
|
|
67
|
-
[row]
|
|
68
|
-
[col span="12"]
|
|
69
|
-
Content
|
|
70
|
-
[/col]
|
|
71
|
-
[/row]
|
|
72
|
-
[/section]
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
- `bg`: RGB/hex color value
|
|
76
|
-
|
|
77
|
-
## Grid System
|
|
78
|
-
|
|
79
|
-
### Row
|
|
80
|
-
```
|
|
81
|
-
[row v_align="middle" h_align="center"]
|
|
82
|
-
[col span="4" span__sm="12"]...[/col]
|
|
83
|
-
[col span="4" span__sm="12"]...[/col]
|
|
84
|
-
[col span="4" span__sm="12"]...[/col]
|
|
85
|
-
[/row]
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**Parameters:**
|
|
89
|
-
- `v_align`: "top", "middle", "bottom" (vertical alignment)
|
|
90
|
-
- `h_align`: "left", "center", "right" (row horizontal alignment)
|
|
91
|
-
- `gap`: Space between columns
|
|
92
|
-
|
|
93
|
-
### Column
|
|
94
|
-
```
|
|
95
|
-
[col span="6" span__sm="12" span__md="10" animate="fadeInUp" visibility="hide-for-small" tooltip="Hover text"]
|
|
96
|
-
Content
|
|
97
|
-
[/col]
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
**Parameters:**
|
|
101
|
-
- `span`: Grid units 1-12 (12 = full width, 6 = half, 4 = third)
|
|
102
|
-
- `span__sm`: Mobile override (usually "12")
|
|
103
|
-
- `span__md`: Tablet override
|
|
104
|
-
- `animate`: "fadeInUp", "fadeInLeft", "slideInDown", etc.
|
|
105
|
-
- `visibility`: "hide-for-small", "hide-for-medium", "show-for-small"
|
|
106
|
-
- `tooltip`: Hover tooltip text
|
|
107
|
-
|
|
108
|
-
### Nested Layouts
|
|
109
|
-
```
|
|
110
|
-
[col span="6" span__sm="12"]
|
|
111
|
-
[row_inner]
|
|
112
|
-
[col_inner span="12"]
|
|
113
|
-
Nested content
|
|
114
|
-
[/col_inner]
|
|
115
|
-
[/row_inner]
|
|
116
|
-
[/col]
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
Use `[row_inner]` and `[col_inner]` for layouts nested inside columns.
|
|
120
|
-
|
|
121
|
-
## Content Blocks
|
|
122
|
-
|
|
123
|
-
### Text Block
|
|
124
|
-
```
|
|
125
|
-
[ux_text font_size="2" line_height="1.5" text_align="center"]
|
|
126
|
-
<h2>Heading</h2>
|
|
127
|
-
<p>Paragraph text</p>
|
|
128
|
-
[/ux_text]
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
**Parameters:**
|
|
132
|
-
- `font_size`: 1, 1.5, 2, 2.5, 3
|
|
133
|
-
- `font_size__sm`: Mobile font size
|
|
134
|
-
- `font_size__md`: Tablet font size
|
|
135
|
-
- `line_height`: 1.2, 1.5, 2
|
|
136
|
-
- `text_align`: "left", "center", "right"
|
|
137
|
-
- `color`: RGB, hex, or color name
|
|
138
|
-
|
|
139
|
-
### Image
|
|
140
|
-
```
|
|
141
|
-
[ux_image id="MEDIA_ID" width="25"]
|
|
142
|
-
|
|
143
|
-
[ux_image id="MEDIA_ID" image_size="original" lightbox="true"]
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
**Parameters:**
|
|
147
|
-
- `id`: Media library ID
|
|
148
|
-
- `width`: 10-100 (percentage)
|
|
149
|
-
- `image_size`: "original", "large", "medium", "thumbnail"
|
|
150
|
-
- `lightbox`: "true" for clickable zoom
|
|
151
|
-
|
|
152
|
-
### Video
|
|
153
|
-
```
|
|
154
|
-
[ux_video url="https://youtube.com/watch?v=VIDEO_ID" height="52%" depth="3"]
|
|
155
|
-
|
|
156
|
-
[ux_video url="https://vimeo.com/VIDEO_ID" height="400px"]
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
**Parameters:**
|
|
160
|
-
- `url`: YouTube, Vimeo, or direct video URL
|
|
161
|
-
- `height`: "52%" (relative) or "400px" (absolute)
|
|
162
|
-
- `depth`: Shadow depth (1-10)
|
|
163
|
-
|
|
164
|
-
### Featured Box
|
|
165
|
-
```
|
|
166
|
-
[featured_box img="MEDIA_ID" img_width="38"]
|
|
167
|
-
<h3>Feature Title</h3>
|
|
168
|
-
<p>Feature description text</p>
|
|
169
|
-
[/featured_box]
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
**Parameters:**
|
|
173
|
-
- `img`: Media ID for icon/image
|
|
174
|
-
- `img_width`: 20-50 (percentage)
|
|
175
|
-
|
|
176
|
-
### Button
|
|
177
|
-
```
|
|
178
|
-
[button text="Learn More" color="secondary" style="outline" radius="8" link="https://..."]
|
|
179
|
-
|
|
180
|
-
[button text="Get Started" color="primary" size="larger" radius="8" link="https://..."]
|
|
181
|
-
```
|
|
182
|
-
|
|
183
|
-
**Parameters:**
|
|
184
|
-
- `text`: Button label
|
|
185
|
-
- `color`: "primary" (dark blue), "secondary" (accent blue), "white"
|
|
186
|
-
- `style`: "filled", "outline", "link"
|
|
187
|
-
- `size`: "smaller", "medium", "larger"
|
|
188
|
-
- `radius`: "0", "4", "8" (border radius px)
|
|
189
|
-
- `link`: URL or internal page link
|
|
190
|
-
|
|
191
|
-
### Gap
|
|
192
|
-
```
|
|
193
|
-
[gap height="30px"]
|
|
194
|
-
[gap height="60px"]
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
Vertical spacing between sections.
|
|
198
|
-
|
|
199
|
-
### Divider
|
|
200
|
-
```
|
|
201
|
-
[divider align="center" width="100%" height="2px"]
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
**Parameters:**
|
|
205
|
-
- `align`: "left", "center", "right"
|
|
206
|
-
- `width`: "100%", "50%", "200px"
|
|
207
|
-
- `height`: Line thickness (1px, 2px, 3px)
|
|
208
|
-
|
|
209
|
-
### Reusable Block
|
|
210
|
-
```
|
|
211
|
-
[block id="22415"]
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
References a saved reusable block by WordPress post ID. Useful for repeated sections (footers, CTAs, etc.).
|
|
215
|
-
|
|
216
|
-
## XMPro Brand Colors
|
|
217
|
-
|
|
218
|
-
Use these consistently:
|
|
219
|
-
- **Primary Dark Blue**: `#003952` or `rgb(0,57,82)`
|
|
220
|
-
- **Accent Blue**: `#009fde` or `rgb(0,159,222)`
|
|
221
|
-
- **White**: `rgb(255,255,255)` or `#ffffff`
|
|
222
|
-
- **Light Background**: `rgb(246,246,246)` or `#f6f6f6`
|
|
223
|
-
- **Green Accent**: `rgb(148,228,132)` or `#94e484`
|
|
224
|
-
|
|
225
|
-
## Common Page Patterns
|
|
226
|
-
|
|
227
|
-
### Hero + Feature Grid
|
|
228
|
-
```
|
|
229
|
-
[section bg="HERO_IMAGE_ID" bg_overlay="rgba(0,57,82,0.657)" padding="140px"]
|
|
230
|
-
[row h_align="center"]
|
|
231
|
-
[col span="8" span__sm="12"]
|
|
232
|
-
[ux_text font_size="2.5" text_align="center"]<h1>Hero Title</h1>[/ux_text]
|
|
233
|
-
[/col]
|
|
234
|
-
[/row]
|
|
235
|
-
[/section]
|
|
236
|
-
|
|
237
|
-
[section bg="rgb(246,246,246)" padding="60px"]
|
|
238
|
-
[row h_align="center" gap="20px"]
|
|
239
|
-
[col span="4" span__sm="12" animate="fadeInUp"]
|
|
240
|
-
[featured_box img="ICON_ID"]
|
|
241
|
-
<h3>Feature 1</h3>
|
|
242
|
-
[/featured_box]
|
|
243
|
-
[/col]
|
|
244
|
-
[col span="4" span__sm="12" animate="fadeInUp"]
|
|
245
|
-
[featured_box img="ICON_ID"]
|
|
246
|
-
<h3>Feature 2</h3>
|
|
247
|
-
[/featured_box]
|
|
248
|
-
[/col]
|
|
249
|
-
[col span="4" span__sm="12" animate="fadeInUp"]
|
|
250
|
-
[featured_box img="ICON_ID"]
|
|
251
|
-
<h3>Feature 3</h3>
|
|
252
|
-
[/featured_box]
|
|
253
|
-
[/col]
|
|
254
|
-
[/row]
|
|
255
|
-
[/section]
|
|
256
|
-
```
|
|
257
|
-
|
|
258
|
-
### CTA Section
|
|
259
|
-
```
|
|
260
|
-
[section bg="rgb(0,57,82)" padding="80px"]
|
|
261
|
-
[row h_align="center"]
|
|
262
|
-
[col span="6" span__sm="12"]
|
|
263
|
-
[ux_text font_size="2" text_align="center" color="white"]
|
|
264
|
-
<h2>Ready to Get Started?</h2>
|
|
265
|
-
<p>Explore XMPro today.</p>
|
|
266
|
-
[/ux_text]
|
|
267
|
-
[gap height="20px"]
|
|
268
|
-
[button text="Learn More" color="secondary" style="filled" link="https://..."]
|
|
269
|
-
[/col]
|
|
270
|
-
[/row]
|
|
271
|
-
[/section]
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
### Stats/Numbers Row
|
|
275
|
-
```
|
|
276
|
-
[row h_align="center" gap="30px"]
|
|
277
|
-
[col span="3" span__sm="12" text_align="center"]
|
|
278
|
-
[ux_text font_size="3"]<strong>500+</strong>[/ux_text]
|
|
279
|
-
<p>Customers</p>
|
|
280
|
-
[/col]
|
|
281
|
-
[col span="3" span__sm="12" text_align="center"]
|
|
282
|
-
[ux_text font_size="3"]<strong>10M+</strong>[/ux_text]
|
|
283
|
-
<p>Data Points</p>
|
|
284
|
-
[/col]
|
|
285
|
-
[col span="3" span__sm="12" text_align="center"]
|
|
286
|
-
[ux_text font_size="3"]<strong>99.9%</strong>[/ux_text]
|
|
287
|
-
<p>Uptime</p>
|
|
288
|
-
[/col]
|
|
289
|
-
[col span="3" span__sm="12" text_align="center"]
|
|
290
|
-
[ux_text font_size="3"]<strong>24/7</strong>[/ux_text]
|
|
291
|
-
<p>Support</p>
|
|
292
|
-
[/col]
|
|
293
|
-
[/row]
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
## Image Workflow
|
|
297
|
-
|
|
298
|
-
### Selecting images from the media library
|
|
299
|
-
1. Call `wp_search_media` with relevant keywords
|
|
300
|
-
2. **Display the thumbnail URLs visually** — fetch each `thumbnail_url` and show the images inline so the user can see their options
|
|
301
|
-
3. Present as numbered choices with titles and dimensions
|
|
302
|
-
4. The user picks by number, or drops a new image into the chat
|
|
303
|
-
|
|
304
|
-
### Uploading new images
|
|
305
|
-
- **User drops image in chat**: Read the file, base64-encode it, call `wp_upload_media`
|
|
306
|
-
- **Image at a URL**: Call `wp_upload_media_from_url` (server-side download)
|
|
307
|
-
- Use the returned media ID in `[ux_image id="RETURNED_ID"]`, `[section bg="RETURNED_ID"]`, or `[featured_box img="RETURNED_ID"]`
|
|
308
|
-
|
|
309
|
-
## Page Creation Workflow
|
|
310
|
-
|
|
311
|
-
1. **Start from a clone** whenever possible: Call `wp_clone_content` to duplicate a similar existing page, then modify. Pages are too complex to build from scratch in most cases.
|
|
312
|
-
2. **Ask the user** what the page is about, what sections they need, and any specific requirements. Use Claude's question feature.
|
|
313
|
-
3. **Search for images**: Proactively call `wp_search_media` and **show thumbnails visually** for section backgrounds, feature icons, etc.
|
|
314
|
-
4. **Create or update the draft**: Use `wp_create_draft` or `wp_update_content` with content_format: "html".
|
|
315
|
-
5. **Set featured image**: Call `wp_set_featured_image`.
|
|
316
|
-
6. **Set Yoast SEO**: Call `wp_update_yoast_metadata`.
|
|
317
|
-
7. **Preview**: Call `wp_get_preview_link` and share the signed URL. This is essential for pages since the shortcode layout can only be judged visually.
|
|
318
|
-
8. **Iterate**: The user reviews the preview in their browser and requests changes.
|
|
319
|
-
9. **Publish**: Call `wp_publish_content` when approved (triggers confirmation flow).
|
|
320
|
-
|
|
321
|
-
The user should never need to open WordPress. Everything happens in the chat.
|
|
322
|
-
|
|
323
|
-
## Pro Tips
|
|
324
|
-
|
|
325
|
-
- **Clone existing pages**: Use `wp_clone_content` to clone similar pages as a starting point. Pages are complex—duplicating structure is faster than building from scratch.
|
|
326
|
-
- **Responsive first**: Always include `span__sm="12"` on columns for mobile single-column layout.
|
|
327
|
-
- **Use reusable blocks**: For repeated elements (CTAs, footers), reference existing `[block id="X"]` blocks to maintain consistency.
|
|
328
|
-
- **Section padding**: Hero sections typically `padding="140px"`, feature sections `padding="60px"`, content sections `padding="40px"`.
|
|
329
|
-
- **Video backgrounds**: Always provide both `video_mp4` and `video_webm` for cross-browser compatibility.
|
|
330
|
-
- **Animations**: Use subtle animations like `animate="fadeInUp"` on columns for visual interest.
|
|
331
|
-
- **Nested rows**: For complex layouts, use `[row_inner]` inside columns.
|
|
332
|
-
- **Show don't tell**: Always show image thumbnails visually rather than just listing metadata.
|
|
333
|
-
- **Preview is king**: Always share the preview link before publishing.
|
|
334
|
-
|
|
335
|
-
## Content Format Setting
|
|
336
|
-
|
|
337
|
-
Always use:
|
|
338
|
-
```
|
|
339
|
-
content_format: "html"
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
This ensures shortcodes are processed correctly and not converted to markdown.
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
# XMPro Blog Post Format Guide
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
XMPro blog posts use the Flatsome theme with a **prose-first** approach. Most content is plain text paragraphs. Flatsome shortcodes are used sparingly for specific layout elements (hero images, spacing, author attribution, and column sections).
|
|
5
|
-
|
|
6
|
-
**Critical:** Use `content_format: "html"` when content contains shortcodes.
|
|
7
|
-
|
|
8
|
-
## Content Structure Pattern
|
|
9
|
-
|
|
10
|
-
```
|
|
11
|
-
[Hero Image - optional]
|
|
12
|
-
↓
|
|
13
|
-
[Gap - optional spacing]
|
|
14
|
-
↓
|
|
15
|
-
[Body Paragraphs - plain text, no wrapping shortcode]
|
|
16
|
-
↓
|
|
17
|
-
[Section breaks with gaps]
|
|
18
|
-
↓
|
|
19
|
-
[Multi-column layouts - optional]
|
|
20
|
-
↓
|
|
21
|
-
[Author attribution - if needed]
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Core Rules
|
|
25
|
-
|
|
26
|
-
1. **Body paragraphs are plain text** — Do NOT wrap in shortcodes
|
|
27
|
-
2. **Images at top of post** — Use `[ux_image]` shortcode only for hero/feature images
|
|
28
|
-
3. **Spacing between sections** — Use `[gap]` shortcode
|
|
29
|
-
4. **Section headings** — Plain text (h2, h3, etc.), no shortcode wrapping
|
|
30
|
-
5. **Multi-column content** — Use `[row]` and `[col]` for side-by-side layouts only
|
|
31
|
-
6. **Author box at end** — Use `[testimonial]` shortcode
|
|
32
|
-
|
|
33
|
-
## Commonly Used Shortcodes
|
|
34
|
-
|
|
35
|
-
### Hero Image
|
|
36
|
-
```
|
|
37
|
-
[ux_image id="12345" image_size="original"]
|
|
38
|
-
```
|
|
39
|
-
- `id`: WordPress media library ID (upload first, get ID, then use here)
|
|
40
|
-
- `image_size`: "original", "large", "medium", "thumbnail"
|
|
41
|
-
|
|
42
|
-
### Gap (Spacing)
|
|
43
|
-
```
|
|
44
|
-
[gap]
|
|
45
|
-
[gap height="15px"]
|
|
46
|
-
[gap height="30px"]
|
|
47
|
-
```
|
|
48
|
-
- Default gap height is standard vertical spacing
|
|
49
|
-
- Specify `height` for custom spacing
|
|
50
|
-
|
|
51
|
-
### Centered Text Section
|
|
52
|
-
```
|
|
53
|
-
[ux_text text_align="center"]
|
|
54
|
-
Your centered content here
|
|
55
|
-
[/ux_text]
|
|
56
|
-
```
|
|
57
|
-
- `text_align`: "left", "center", "right"
|
|
58
|
-
- Useful for quotes, callouts, or emphasized sections
|
|
59
|
-
|
|
60
|
-
### Multi-Column Layout
|
|
61
|
-
```
|
|
62
|
-
[row h_align="center"]
|
|
63
|
-
[col span="4" span__sm="12"]
|
|
64
|
-
Left column content
|
|
65
|
-
[/col]
|
|
66
|
-
[col span="4" span__sm="12"]
|
|
67
|
-
Right column content
|
|
68
|
-
[/col]
|
|
69
|
-
[/row]
|
|
70
|
-
```
|
|
71
|
-
- `span`: Grid units (12 = full width, 6 = half, 4 = third)
|
|
72
|
-
- `span__sm`: Mobile width override (usually "12" for full-width on mobile)
|
|
73
|
-
- `h_align`: "left", "center", "right" for row alignment
|
|
74
|
-
|
|
75
|
-
### Author Attribution
|
|
76
|
-
```
|
|
77
|
-
[testimonial image="4567" stars="0"]
|
|
78
|
-
By Your Name
|
|
79
|
-
Your Title / Company
|
|
80
|
-
[/testimonial]
|
|
81
|
-
```
|
|
82
|
-
- `image`: Media ID for author photo (optional)
|
|
83
|
-
- `stars`: "0" for no star rating (standard for author box)
|
|
84
|
-
- Text inside becomes the author byline
|
|
85
|
-
|
|
86
|
-
## Minimal Template
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
[ux_image id="HERO_IMAGE_ID" image_size="original"]
|
|
90
|
-
|
|
91
|
-
[gap height="30px"]
|
|
92
|
-
|
|
93
|
-
This is the opening paragraph. Write naturally without shortcodes. XMPro blog posts emphasize clear, readable prose.
|
|
94
|
-
|
|
95
|
-
This is the second paragraph. Keep paragraphs separated by blank lines naturally.
|
|
96
|
-
|
|
97
|
-
[gap height="20px"]
|
|
98
|
-
|
|
99
|
-
## Section Heading
|
|
100
|
-
|
|
101
|
-
Continue with body paragraphs under each section. Plain text, no wrapping shortcodes.
|
|
102
|
-
|
|
103
|
-
[gap height="30px"]
|
|
104
|
-
|
|
105
|
-
[row h_align="center"]
|
|
106
|
-
[col span="6" span__sm="12"]
|
|
107
|
-
First column content here
|
|
108
|
-
[/col]
|
|
109
|
-
[col span="6" span__sm="12"]
|
|
110
|
-
Second column content here
|
|
111
|
-
[/col]
|
|
112
|
-
[/row]
|
|
113
|
-
|
|
114
|
-
[gap height="40px"]
|
|
115
|
-
|
|
116
|
-
[testimonial image="AUTHOR_PHOTO_ID" stars="0"]
|
|
117
|
-
By Jane Doe
|
|
118
|
-
Product Manager, XMPro
|
|
119
|
-
[/testimonial]
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
## Image Workflow
|
|
123
|
-
|
|
124
|
-
### Selecting images from the media library
|
|
125
|
-
When the user needs an image (featured image, hero image, inline image):
|
|
126
|
-
1. Call `wp_search_media` with relevant keywords
|
|
127
|
-
2. **Display the thumbnail URLs visually** — fetch each `thumbnail_url` and show the images inline in the conversation so the user can see their options
|
|
128
|
-
3. Present them as numbered choices: "Here are matching images:" with the visual thumbnails, titles, and dimensions
|
|
129
|
-
4. Let the user pick by number, or offer: "You can also drop an image into the chat and I'll upload it"
|
|
130
|
-
5. Use the selected media ID in shortcodes or `wp_set_featured_image`
|
|
131
|
-
|
|
132
|
-
### Uploading new images
|
|
133
|
-
- **User drops image in chat**: Read the file, base64-encode it, call `wp_upload_media` with filename, mime_type, bytes_base64, and alt_text
|
|
134
|
-
- **Image at a URL**: Call `wp_upload_media_from_url` with the URL (server-side download, no base64 needed)
|
|
135
|
-
- After upload, use the returned media ID in `[ux_image id="RETURNED_ID"]` or `wp_set_featured_image`
|
|
136
|
-
|
|
137
|
-
### Placing images in content
|
|
138
|
-
- Hero image at top of post: `[ux_image id="MEDIA_ID" image_size="original"]`
|
|
139
|
-
- Featured image (thumbnail shown in listings): `wp_set_featured_image` tool
|
|
140
|
-
- Inline image mid-content: Include `[ux_image id="MEDIA_ID"]` directly in the content at the right position
|
|
141
|
-
|
|
142
|
-
## Content Creation Workflow
|
|
143
|
-
|
|
144
|
-
Follow this order for a complete post:
|
|
145
|
-
|
|
146
|
-
1. **Ask the user** what the post is about, who the author should be, and any specific requirements. Use Claude's question feature to gather missing info — make fields optional so the user can say "just go with defaults."
|
|
147
|
-
2. **Find the author**: Call `wp_list_authors` to get available authors. If the user doesn't specify, use the default.
|
|
148
|
-
3. **Find categories/tags**: Call `wp_list_terms` to find relevant categories. Create new terms with `wp_create_term` if needed.
|
|
149
|
-
4. **Search for images**: Proactively call `wp_search_media` with relevant terms and **show the thumbnails visually** so the user can pick a featured image and any inline images.
|
|
150
|
-
5. **Create the draft**: Call `wp_create_draft` with title, content (using shortcodes), excerpt, author, terms, and content_format: "html".
|
|
151
|
-
6. **Set featured image**: Call `wp_set_featured_image` with the chosen media ID.
|
|
152
|
-
7. **Set Yoast SEO**: Call `wp_update_yoast_metadata` with focus keyphrase, meta description, and SEO title.
|
|
153
|
-
8. **Preview**: Call `wp_get_preview_link` and share the signed URL so the user can see exactly how it looks on the live site.
|
|
154
|
-
9. **Iterate**: The user reviews the preview and requests changes. Use `wp_update_content` to adjust.
|
|
155
|
-
10. **Publish**: When the user approves, call `wp_publish_content` (with optional future date for scheduling). This triggers the confirmation token flow.
|
|
156
|
-
|
|
157
|
-
The user should never need to open WordPress. Everything happens in the chat.
|
|
158
|
-
|
|
159
|
-
## Pro Tips
|
|
160
|
-
|
|
161
|
-
- **Don't over-shortcode**: Plain text paragraphs are the norm. Only use shortcodes when layout requires it.
|
|
162
|
-
- **Responsive design**: Always include `span__sm="12"` on columns for mobile single-column layout
|
|
163
|
-
- **Spacing rhythm**: Use gaps consistently (15px, 20px, 30px) to create visual hierarchy
|
|
164
|
-
- **Hero images**: Place them at the very top, before any text
|
|
165
|
-
- **Author attribution**: Usually only at the very end of the post
|
|
166
|
-
- **Show don't tell**: Always show image thumbnails visually rather than just listing metadata
|
|
167
|
-
- **Preview is king**: Always share the preview link before publishing so the user sees the real result
|
|
168
|
-
|
|
169
|
-
## Content Format Setting
|
|
170
|
-
|
|
171
|
-
Always use:
|
|
172
|
-
```
|
|
173
|
-
content_format: "html"
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
This ensures shortcodes are processed correctly and not converted to markdown.
|