# Dark mode for Shopify > How to add dark mode to your Shopify store with one line of code, step by step. ## Before you start - Make a copy of your theme first, so that you can go back: in Online Store, then Themes, open the menu next to your current theme and choose Duplicate. ## Add DarkYes to your Shopify store 1. Create a free DarkYes account and add your site's address. In your dashboard, press Get the code next to the site, then Copy code. Your line looks like this, with your own key in place of `YOUR-KEY`: ```html ``` 2. In your Shopify admin, go to Online Store, then Themes. 3. Next to your current theme, open the menu and choose Edit code. 4. In the Layout folder, open `theme.liquid`. 5. Find the line `` and paste your line just before it. 6. Press Save. When you update your theme to a new version, Shopify makes an updated copy without your own code changes. Paste the line again in the new copy. Checkout pages keep Shopify's own look. ## Check that it works 1. Open your site in a private window. 2. Look for the switch in the bottom-right corner, and press it. 3. In your dashboard, the site changes from “Waiting for the first visit” to “Active”. ## Remove it Open `theme.liquid` again, delete your line, and press Save. Your site then looks exactly as it did before. These steps were checked against [the Shopify Help Center](https://help.shopify.com/en/manual/online-store/themes/customizing-themes/edit-code/edit-theme-code) and [Shopify's theme documentation](https://shopify.dev/docs/themes/files/theme-liquid) on 14 November 2026. ## Try it on your own site. Create a free account, add your site and paste one line. When your first site goes live, you get 14 days of Pro for free. Start free, no card needed: https://darkyes.com/auth/login?return_to=/app --- This is the Markdown version of https://darkyes.com/platforms/shopify. Every page of this site: https://darkyes.com/llms.txt