Content Processing controls how Wash transforms WordPress content before syncing to Shopify. This includes URL rewriting, custom HTML tags, and content sanitization.
How Content Processing Works
WordPress Post Content
↓
HTML Parsing & Sanitization
↓
URL Rewriting (images, links)
↓
Custom HTML Tag Processing
↓
Gutenberg Block Conversion
↓
Shopify Article Body
URL Rewriting
Wash automatically rewrites URLs in your content to work correctly on Shopify.
What Gets Rewritten
| URL Type | Before | After |
|---|---|---|
| Images | yourblog.com/wp-content/uploads/image.jpg | cdn.shopify.com/s/files/.../image.jpg |
| Internal links | yourblog.com/post-name/ | yourstore.com/blogs/news/post-name |
| Category links | yourblog.com/category/news/ | yourstore.com/blogs/news |
| Author links | yourblog.com/author/john/ | Removed or preserved (configurable) |
URL Rewriting Settings
| Setting | Description | Default |
|---|---|---|
| Rewrite internal links | Convert WordPress URLs to Shopify URLs | On |
| Rewrite image URLs | Point images to Shopify CDN | On |
| Preserve external links | Keep links to other domains unchanged | On |
| Add nofollow to external | Add rel="nofollow" to external links | Off |
| Open external in new tab | Add target="_blank" to external links | Off |
Link Mapping Rules
You can create custom link mapping rules:
{
"patterns": [
{
"from": "/category/news/",
"to": "/blogs/news"
},
{
"from": "/tag/([^/]+)/",
"to": "/blogs/news/tagged/$1"
},
{
"from": "/author/([^/]+)/",
"to": null
}
]
}
Custom HTML Tags
Shopify's article body field has limitations on which HTML tags are allowed. Wash can transform custom tags.
Allowed Tags in Shopify
Shopify allows these HTML tags in article content:
a, abbr, acronym, address, b, blockquote, br, cite, code,
dd, del, dfn, div, dl, dt, em, h1-h6, hr, i, img, ins, kbd,
li, ol, p, pre, q, s, samp, small, span, strike, strong,
sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, var
Tag Transformation
| WordPress Tag | Shopify Equivalent | Notes |
|---|---|---|
<figure> | <div class="figure"> | Wraps images with captions |
<figcaption> | <p class="caption"> | Image caption text |
<article> | <div class="article"> | Semantic wrapper |
<section> | <div class="section"> | Content section |
<aside> | <div class="aside"> | Sidebar content |
<nav> | <div class="nav"> | Navigation element |
<header> | <div class="header"> | Header element |
<footer> | <div class="footer"> | Footer element |
<main> | <div class="main"> | Main content |
<iframe> | Removed or placeholder | Not allowed in Shopify |
<script> | Removed | Security: never synced |
<style> | Removed | Use theme styles instead |
Custom Tag Rules
Define your own tag transformation rules:
- Go to Wash > Settings > Content Processing
- Find Custom Tag Rules section
- Add rules in JSON format
{
"rules": [
{
"tag": "custom-cta",
"replace_with": "div",
"add_class": "cta-box"
},
{
"tag": "warning-box",
"replace_with": "div",
"add_class": "alert alert-warning"
},
{
"tag": "video-embed",
"action": "remove"
}
]
}
Content Sanitization
Security Filtering
Wash automatically removes potentially dangerous content:
- Scripts — All
<script>tags removed - Event handlers —
onclick,onload, etc. removed - JavaScript URLs —
javascript:links converted to# - Data URLs — Large data URLs in images removed
- Iframes — Removed unless from allowlisted domains
Iframe Allowlist
Some iframes can be preserved if from trusted sources:
| Source | Allowed | Notes |
|---|---|---|
| YouTube | Yes | youtube.com, youtube-nocookie.com |
| Vimeo | Yes | vimeo.com, player.vimeo.com |
| Spotify | Yes | open.spotify.com |
| SoundCloud | Yes | soundcloud.com |
| Google Maps | Configurable | Enable in settings |
| Custom domains | Configurable | Add to allowlist |
Note: Even allowlisted iframes may not render in Shopify article content. Consider using metafields for embedded content.
Shortcode Handling
WordPress shortcodes are processed before sync:
Shortcode Options
| Option | Description |
|---|---|
| Render shortcodes | Execute shortcodes and sync rendered HTML |
| Remove shortcodes | Strip shortcode tags, keep inner content |
| Preserve as text | Keep shortcode syntax as plain text |
Common Shortcode Handling
[gallery] → Rendered as image grid
[caption] → Converted to figure/figcaption
[video] → Placeholder or metafield reference
[audio] → Placeholder or metafield reference
[embed] → Processed based on embed type
[custom_shortcode] → Rendered or stripped (configurable)
Whitespace & Formatting
Whitespace Options
| Setting | Description | Default |
|---|---|---|
| Minify HTML | Remove unnecessary whitespace | Off |
| Preserve line breaks | Convert \n to <br> | On |
| Remove empty paragraphs | Strip <p></p> tags | On |
| Fix double spacing | Convert multiple spaces to single | On |
Configuration
Accessing Settings
In WordPress:- Go to Wash > Settings
- Select Content Processing tab
- Configure options and save
- Go to Apps > Wash > Connections
- Select your connection
- Navigate to Settings > Content
Troubleshooting
Content Not Rendering Correctly
- Check if tags are being transformed as expected
- Review custom tag rules for conflicts
- Verify Shopify theme supports the CSS classes
- Check for unclosed HTML tags in source
Links Pointing to Wrong URLs
- Verify URL rewriting is enabled
- Check link mapping rules
- Ensure blog mappings match link patterns
- Review smart redirections for old URLs
Images Not Loading
- Verify image sync is enabled
- Check if image URL rewriting is on
- Confirm images were uploaded to Shopify
- Review image size limits
Embeds Not Working
- Iframes are restricted in Shopify articles
- Use metafields for video embeds
- Consider using Shopify's native video handling
- Check iframe allowlist settings