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 the items as a bulleted list including images or filenames to prevent broken links.

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:

Lowercase Only (Case-Sensitive)

Only tags written in all lowercase are recognized as shortcodes.

  • Targeted for Conversion: [gallery], [audio], etc.
  • Protected: Notations containing uppercase letters or numbers like [Any], [This], or [123] are kept exactly as they are as text.

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]: Only the tag parts are removed; the “Content” is always 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.
  • Target Prefixes: All tags starting with vc_ (from WPBakery) or et_pb_ (from Divi).

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.