With the Shortcode Cleanup option in our migration service, shortcodes included in WordPress posts are automatically converted into formats that display correctly in Shopify themes during the import process. This page explains the specific behavior of each shortcode and the safety features in place to prevent unintended overwrites.

1. Major Shortcodes Automatically Converted

The following shortcodes are automatically replaced with HTML tags or embedded players that work within the Shopify body (body_html).

A shortcode for displaying multiple images in a layout.

  • Specifications: Resolves IDs in the ids attribute to actual image URLs and outputs them as a grid layout based on the columns setting.
  • Output Example: Each image is wrapped in a figure tag, and the entire set is wrapped in a div container with a class for styling adjustments.

[caption] (Image Caption)

A shortcode for adding descriptions (captions) to images.

  • Specifications: Separates the image tag from the text and converts them into a semantic <figure> and <figcaption> structure.

[audio] / [video] (Audio & Video Players)

Shortcodes for playing audio or video files within an article.

  • Specifications: Converted to standard browser <audio controls> or <video controls> tags. For videos, the poster (thumbnail) attribute is also preserved.

[embed] (External Content Embedding)

A shortcode for embedding external sites such as YouTube or Vimeo.

  • Specifications: Automatically identifies YouTube or Vimeo URLs and converts them into embedded <iframe> players. Other URLs are output as external links for safety.

[playlist] (Playlist)

A shortcode for displaying a list of multiple audio or video files.

  • Specifications: Outputs multiple <audio controls> or <video controls> players in sequence.

2. Safety Features to Prevent Unintended Conversion

To ensure that brackets [...] appearing in normal text are not accidentally deleted or converted, we employ the following safety specifications:

Recognition of defined tags

Defined tag names are matched without regard to letter case. Both [gallery] and [GALLERY] are converted. Undefined names such as [gallery-custom] are preserved.

Escaping with Double Brackets

Similar to WordPress standard specifications, you can avoid conversion by using double brackets.

  • Input: [[gallery]]
  • Output: [gallery] (Displays as text instead of being executed as a shortcode)

Protection of Undefined Tags

Unknown tags not defined in the system are handled as follows:

  • Enclosing Type [tag]Content[/tag]: The entire shortcode, including its tags and content, is preserved.
  • Standalone Type [tag]: Unless included in the blacklist mentioned below, it is treated as text and kept as is.

3. Automatic Removal of Unnecessary Code (Blacklist)

Known code from plugins that becomes unnecessary during Shopify migration is automatically removed.

  • Target Keywords: contact-form-7, mwform_formkey, gravityform, contact-form, rev_slider, layerslider, sitemap, addtoany, yoast_breadcrumb, etc.

These settings are managed in a configuration file for developers (shortcode-config.ts), and specific tags can be added to the removal list as needed.

4. Restoring page builder content

Known WPBakery and Divi layout wrappers are removed while preserving their text. Images, galleries, buttons and videos are restored from attributes to standard HTML using the tags below. The original layout and styling CSS are not reproduced.

TypeSupported tags
Imagesvc_single_image, et_pb_image
Galleriesvc_gallery, et_pb_gallery
Buttonsvc_btn, vc_button, et_pb_button
Videosvc_video, et_pb_video

Image IDs require attachment URLs in the XML or media data retrieved by the WP Plugin. A JSON file without media data cannot resolve IDs alone. Unsupported components, unresolved images and invalid attributes keep their original shortcodes, and affected articles are listed on screen.

5. Automatic line break formatting

By default, existing blocks are preserved and unwrapped text outside blocks receives paragraphs. “Format line breaks inside existing blocks” is initially off and requires paragraph formatting. There is no additional fee.

When enabled, unwrapped text inside containers such as div receives paragraphs. Text elements such as p, li and td keep their structure, with text line breaks converted to br. Whitespace-only indentation, tags, attributes, comments, code, SVG and MathML are preserved. Check the preview.

Detection checks all exported bodies and excerpts using the current field mappings and published/draft scope. Preview and CSV use the same processing.

If any specified gallery or playlist media cannot be resolved, the entire shortcode is preserved and the affected article is reported. Audio and video with URLs that cannot be safely converted are also preserved. Content inside unknown enclosing tags and line breaks in shortcode attributes remain unchanged. Line breaks used to arrange images do not receive br tags.