Wordpress Elementor

jezweb/claude-skills/plugins/wordpress/skills/wordpress-elementor

作者 jezweb64965d9d9fc7無授權條款1K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫3 天前更新

Edit Elementor pages and manage templates on WordPress sites via browser automation (for visual / structural changes) or WP-CLI (for safe text replacements). Use whenever the user wants to edit an Elementor page, update text in Elementor widgets, apply or manage Elementor templates, or make content changes to pages built with the Elementor page builder.

AI 產生的概覽

透過 WP-CLI 或瀏覽器自動化編輯 WordPress 網站上的 Elementor 頁面並管理範本。

功能
此技能引導代理編輯以 Elementor 頁面建構器建立的現有 WordPress 頁面。內容涵蓋辨識 Elementor 頁面、在 WP-CLI 文字取代與瀏覽器視覺化編輯之間做選擇、備份與清除 CSS 快取,以及管理、匯出、匯入、套用與複製 Elementor 範本。它會在實際運作的 WordPress 網站上產出更新後的頁面內容與範本變更。
適用情境
當使用者想修改 Elementor 小工具中的文字或圖片、對 Elementor 頁面進行結構或版面調整,或套用與管理 Elementor 範本時使用。它適用於已安裝並啟用 Elementor 的現有 WordPress 網站。
執行需求
需要可用的 WP-CLI 連線或 WordPress 管理員存取權、已安裝並啟用的 Elementor,以及所引用的 wordpress-setup 技能來取得網站存取權。視覺化與結構編輯需要透過 playwright-cli 或 Chrome MCP 進行瀏覽器自動化。此技能不附帶指令碼,僅為操作說明。

WordPress Elementor

Edit Elementor pages and manage templates on existing WordPress sites. Produces updated page content via browser automation (for visual/structural changes) or WP-CLI (for safe text replacements).

Prerequisites

  • Working WP-CLI connection or admin access (use wordpress-setup skill)
  • Elementor installed and active: wp @site plugin status elementor

Workflow

Step 1: Identify the Page

bash
# List Elementor pageswp @site post list --post_type=page --meta_key=_elementor_edit_mode --meta_value=builder \  --fields=ID,post_title,post_name,post_status
# Editor URL format: https://example.com/wp-admin/post.php?post={ID}&action=elementor

Step 2: Choose Editing Method

Change TypeMethodRisk
Text content updatesWP-CLI search-replaceLow (with backup)
Image URL swapsWP-CLI meta updateLow (with backup)
Widget stylingBrowser automationNone
Add/remove sectionsBrowser automationNone
Layout changesBrowser automationNone
Template applicationBrowser automationNone

Rule of thumb: If you're only changing text or URLs within existing widgets, WP-CLI is faster. For anything structural, use the visual editor via browser.

Step 3a: Text Updates via WP-CLI

Always back up first:

bash
wp @site post meta get {post_id} _elementor_data > /tmp/elementor-backup-{post_id}.json

Pre-flight checklist:

  1. Back up the postmeta (above)
  2. Dry run the replacement
  3. Verify the dry run matches expectations (correct number of replacements)
  4. Execute
  5. Flush CSS cache
  6. Verify visually

Simple text replacement:

bash
# Dry runwp @site search-replace "Old Heading Text" "New Heading Text" wp_postmeta \  --include-columns=meta_value --dry-run --precise
# Execute (after confirming dry run looks correct)wp @site search-replace "Old Heading Text" "New Heading Text" wp_postmeta \  --include-columns=meta_value --precise

After updating, clear Elementor's CSS cache:

bash
wp @site elementor flush-css

If the elementor WP-CLI command isn't available:

bash
wp @site option delete _elementor_global_csswp @site post meta delete-all _elementor_css

What's safe to replace:

SafeRisky
Headings textHTML structure
Paragraph textWidget IDs
Button text and URLsSection/column settings
Image URLs (same dimensions)Layout properties
Phone numbers, emailsCSS classes
AddressesElement ordering

Step 3b: Visual Editing via Browser Automation

For structural changes, use browser automation to interact with Elementor's visual editor.

Login flow (skip if already logged in via Chrome MCP):

  1. Navigate to https://example.com/wp-admin/
  2. Enter username and password
  3. Click "Log In"
  4. Wait for dashboard to load

Open the editor:

  1. Navigate to https://example.com/wp-admin/post.php?post={ID}&action=elementor
  2. Wait for Elementor loading overlay to disappear (can take 5-10 seconds)
  3. Editor is ready when the left sidebar shows widget panels

Edit text content:

  1. Click on the text element in the page preview (right panel)
  2. The element becomes selected (blue border)
  3. The left sidebar shows the element's settings
  4. Under "Content" tab, edit the text in the editor field
  5. Changes appear live in the preview
  6. Click "Update" (green button, bottom left) or Ctrl+S

Edit heading:

  1. Click the heading in the preview
  2. Left sidebar > Content tab > "Title" field
  3. Edit the text
  4. Optionally adjust: HTML tag (H1-H6), alignment, link
  5. Save

Change image:

  1. Click the image widget in the preview
  2. Left sidebar > Content tab > click the image thumbnail
  3. Media Library opens
  4. Select new image or upload
  5. Click "Insert Media"
  6. Save

Edit button:

  1. Click the button in the preview
  2. Left sidebar > Content tab: Text (label), Link (URL), Icon (optional)
  3. Style tab: colours, typography, border, padding
  4. Save

Using playwright-cli:

bash
playwright-cli -s=wp-editor open "https://example.com/wp-admin/"# Login first, then navigate to Elementor editorplaywright-cli -s=wp-editor navigate "https://example.com/wp-admin/post.php?post={ID}&action=elementor"

Or Chrome MCP if using the user's logged-in session.

Step 4: Manage Templates

List saved templates:

bash
wp @site post list --post_type=elementor_library --fields=ID,post_title,post_status

Export a template (browser):

  1. Navigate to: https://example.com/wp-admin/edit.php?post_type=elementor_library
  2. Hover over the template > "Export Template"
  3. Downloads as .json file

Import a template (browser):

  1. Navigate to: https://example.com/wp-admin/edit.php?post_type=elementor_library
  2. Click "Import Templates" at the top
  3. Choose file > upload .json
  4. Template appears in the library

Apply a template to a new page:

  1. Create the page: wp @site post create --post_type=page --post_title="New Page" --post_status=draft
  2. Open in Elementor via browser
  3. Click the folder icon (Add Template)
  4. Select from "My Templates" tab
  5. Click "Insert"
  6. Customise and save

Duplicate an existing page via WP-CLI:

bash
# Get source page's Elementor dataSOURCE_DATA=$(wp @site post meta get {source_id} _elementor_data)SOURCE_CSS=$(wp @site post meta get {source_id} _elementor_page_settings)
# Create new pageNEW_ID=$(wp @site post create --post_type=page --post_title="Duplicated Page" --post_status=draft --porcelain)
# Copy Elementor datawp @site post meta update $NEW_ID _elementor_data "$SOURCE_DATA"wp @site post meta update $NEW_ID _elementor_edit_mode "builder"wp @site post meta update $NEW_ID _elementor_page_settings "$SOURCE_CSS"
# Regenerate CSSwp @site elementor flush-css

Apply template between pages via WP-CLI:

bash
# Get source dataSOURCE=$(wp @site post meta get {source_id} _elementor_data)SETTINGS=$(wp @site post meta get {source_id} _elementor_page_settings)
# Apply to targetwp @site post meta update {target_id} _elementor_data "$SOURCE"wp @site post meta update {target_id} _elementor_edit_mode "builder"wp @site post meta update {target_id} _elementor_page_settings "$SETTINGS"
# Clear cachewp @site elementor flush-css

Step 5: Verify

bash
# Check the page statuswp @site post get {post_id} --fields=ID,post_title,post_status,guid
# Get live URLwp @site post get {post_id} --field=guid

Take a screenshot to confirm visual changes:

bash
playwright-cli -s=verify open "https://example.com/{page-slug}/"playwright-cli -s=verify screenshot --filename=page-verify.pngplaywright-cli -s=verify close

Critical Patterns

Elementor Data Format

Elementor stores page content as JSON in _elementor_data postmeta. The structure is:

Section > Column > Widget

Each element has an id, elType, widgetType, and settings object. Direct manipulation of this JSON is possible but fragile -- always back up first and prefer search-replace over manual JSON editing.

CSS Cache

After any WP-CLI change to Elementor data, you must flush the CSS cache. Elementor pre-generates CSS from widget settings. Stale cache = visual changes don't appear.

bash
wp @site elementor flush-css# OR if elementor CLI not available:wp @site option delete _elementor_global_csswp @site post meta delete-all _elementor_css

Global Widgets

Global widgets are shared across pages. Editing one updates all instances.

bash
# List global widgetswp @site post list --post_type=elementor_library --meta_key=_elementor_template_type \  --meta_value=widget --fields=ID,post_title

Caution: Replacing text in a global widget's data affects every page that uses it.

Elementor Pro vs Free

FeatureFreePro
Basic widgetsYesYes
Theme BuilderNoYes
Custom fontsNoYes
Form widgetNoYes
WooCommerce widgetsNoYes
Dynamic contentNoYes

Theme Builder templates (header, footer, archive) are stored as elementor_library post type with specific meta indicating their display conditions.

Common Elementor WP-CLI Commands

If the Elementor CLI extension is available:

bash
wp @site elementor flush-css          # Clear CSS cachewp @site elementor library sync       # Sync with template librarywp @site elementor update db          # Update database after version change

來源與署名

來源:jezweb/claude-skills位於plugins/wordpress/skills/wordpress-elementor提交64965d9

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架