All Collections
Shopify FAQ
Shopify Theme Questions
How do I remove Shogun code from my Shopify theme?
How do I remove Shogun code from my Shopify theme?

Steps on how to remove files and code after uninstalling Shogun.

Updated over a week ago

Shogun lets you keep all of your pages and changes after you uninstall our app. Because of this, some Shogun files & code will remain in your theme to ensure the saved content will continue to display correctly.

If you plan to keep your Shogun content after uninstalling, it is recommended to leave the code in your theme to ensure the pages remain functional.

Can Shogun Support Do This For Me?

To assist you with removing this code, we have provided this detailed guide. Please note that while Shogun Support is here to offer guidance and answer any questions you may have, we are unable to make direct changes, including removing Shogun generated code, to your theme on your behalf.

We encourage you to follow the steps outlined in the guide or consult a Shopify expert if you need further assistance.

Before Removing the Theme Code

If you've published any content using Shogun, there will also be some Shogun HTML in the content fields of the store's pages. It is recommended to remove that content before beginning this process. The Undo Import feature can be used to remove Shogun content.

If you do not have any active Shogun content and would like to completely remove all Shogun code from your Shopify theme, you can follow the steps below.

If you have used Shogun to replace your storefront's homepage, there will be Shogun code in the index.liquid file of the theme. We recommend using the Unset Homepage option to roll back to the theme's original version.

Removing the Theme Code

Fair Warning: If you have any active Shogun pages, following these steps may cause those pages to malfunction.

It is important to note that the changes Shogun makes to the theme depends on whether your theme has the Online Store 2.0 architecture or the vintage architecture. You can read more about this and determining which architecture type your current theme has here: Shopify Theme Architecture Versions. Once you have found which architecture type your theme uses, you can select it below and it will take you to where you need to go to get started on removing the theme code:

Vintage Architecture

Go to the Themes section of your Shopify dashboard. Click on the Actions button next to your active theme and select Edit Code.

There are just a few lines of code and some files that need to be removed.

Let's remove the code first.

In the theme.liquid file of the Layout folder, find and remove a line that says

{% render 'shogun-head' %}

In the product.liquid file and any product.*.liquid files in the Templates folder, find and remove the following lines:

{% render 'shogun-products', content: product %} 
{{product.metafields.shogun.above}}

{{product.metafields.shogun.below}}

In the page.liquid file and any page.*.liquid files in the Templates folder, find and remove the following line:

{% render 'shogun-products', content: page %}

In the collection.liquid file and any collection.*.liquid files in the Templates folder, find and remove the following line:

{% render 'shogun-products', content: collection %}
{{collection.metafields.shogun.above}}

{{collection.metafields.shogun.below}}

In the article.liquid file and any article.*.liquid files in the Templates folder, find and remove the following line:

{% render 'shogun-products', content: article %}

Finally, the following files can be deleted from the theme:

  • Layout/theme.shogun.landing.liquid

  • Templates/page.shogun.default.liquid

  • Templates/page.shogun.landing.liquid

  • Templates/product.shogun.custom.liquid

  • Snippets/shogun-head.liquid

  • Snippets/shogun-products.liquid


Online Store 2.0 Architecture

Go to the Themes section of your Shopify dashboard. Click on the Actions button next to your active theme and select Edit Code.

There are just a few lines of code and some files that need to be removed.

Let's remove the code first.

In the theme.liquid file of the Layout folder, find and remove a line that says

{% render 'shogun-head' %}

In the product.json and collection.json files in the Templates folder, find and remove the following lines:

,
"shogun-above": {
   "type": "shogun-above",
   "settings": {
   }
},
"shogun-below": {
   "type": "shogun-below",
   "settings": {
   }
},
"shogun-helper": {
   "type": "shogun-helper",
   "settings": {
   }
}

It's important to make sure you delete the comma right above the "shogun-above" section since there is no other sections after that comma now.

Near the very bottom of these same two files, you will find something similar to the following where you'll only want to delete what has the word "shogun" in it:

Before:

"order": [
   "shogun-helper",
   "shogun-above",
   "main",
   "product-recommendations",
   "shogun-below"
]

After:

"order": [
   "main",
   "product-recommendations"
]

Make sure to remove the comma after the last item again!

In the page.json and article.json files in the Templates folder, find and remove the following lines:

,
"shogun-helper": {
   "type": "shogun-helper",
   "settings": {
   }
}

It's important to make sure you delete the comma right above the "shogun-helper" section since there is no other sections after that comma now.

Near the very bottom of these same two files, you will find something similar to the following where you'll only want to delete: "shogun-helper",

Before:

"order": [
   "shogun-helper",
   "main"
]

After:

"order": [
   "main"
]

Finally, the following files can be deleted from the theme:

  • Layout/theme.shogun.landing.liquid

  • Templates/page.shogun.default.liquid

  • Templates/page.shogun.landing.liquid

  • Templates/product.shogun.custom.liquid

  • Sections/shogun-above.liquid

  • Sections/shogun-below.liquid

  • Sections/shogun-helper.liquid

  • Sections/shogun-home.liquid (this will only exist if you've set a homepage in Shogun)

  • Snippets/shogun-head.liquid

  • Snippets/shogun-products.liquid

Did this answer your question?