Skip to main content
All CollectionsTroubleshooting
Malformed Theme Code
Malformed Theme Code
Updated over 10 months ago

The content for Shopify App Embed Blocks are added to the DOM right before the closing </head> and </body> tags. The content added in each place differs, so the symptoms of the issue are different.

Browsers will automatically place a closing </head> tag before the opening <body> tag if it is not present. Similarly, they will place a closing </body> tag before the closing </html> tag if it is missing. However, Shopify adds the app embed block content to the raw theme.liquid code so if either of the </head> or </body> tags are missing then it won’t be able to properly add the app embed block.

Solution

Ensure there is a closing </head> tag immediately before the opening <body> tag in the theme.liquid file. Add the </head> tag if missing.

Ensure there is a closing </body> tag immediately before the closing </html> tag in the theme.liquid file. Add the </body> tag if missing.

Did this answer your question?