Home > Shopify Development > Insert the security badge code to your theme

How to insert the security badge code to your theme in Shopify

Sam Nguyen
Sam Updated: March 20, 2024

Share:

Drive 20-40% of your revenue with Avada
avada email marketing

As an online store owner, you are able to insert a security badge which is designed by Shopify to your online store to generate trust with your customers Shopify complies with the highest level of standards of Payment Card Industry (PCI). Additionally, you are allowed to choose to add either a dark (or light) colored Shopify security badge, it depends on the color scheme of your online website.

However, please keep reading our instructional writing on How to insert the security badge code to your theme to know more deeply about one this topic.

Table of Contents

Insert the security badge code to your theme for sectioned themes

Step 1:

Go to Online Store > Themes from your Shopify admin panel. Or choose the theme you want to adjust and click Actions > Edit code.

How to insert the secrurity badge code to your theme in shopify

Step 2:

In the next step, you need to paste the code for either the light or the dark security badge into the theme code. Paste the code into one of these following files, it depends on where you want to place the badge on your storefront:

- If you want the security badge to be displayed in your header, then find your header.liquid in the Sections directory - If you want the security badge to be displayed in your footer, then find your footer.liquid in the Sections directory - If you want the security badge to be displayed on your product page, then find your product-template.liquid in the Sections directory - If you want the security badge to be displayed in your cart page, then find your cart-template.liquid in the Sections directory or cart.liquid in the Templates directory

Step 3:

Tap the file to let it opened in the code editor. Find the location in the code where you want to insert your security badge in.

Please paste in the code given below to add a light-colored badge:

<a href="//www.shopify.com/pci-compliant?utm_source=secure&amp;utm_medium=shop" title="This online store is secured by Shopify" target="_blank"><img src="//cdn.shopify.com/s/images/badges/shopify-secure-badge-light-shadow.png" alt="Shopify secure badge" /></a>

Please paste in the code given below to add a dark-colored badge:

<a href="//www.shopify.com/pci-compliant/?utm_source=secure&amp;utm_medium=shop" title="This online store is secured by Shopify" target="_blank"><img src="//cdn.shopify.com/s/images/badges/shopify-secure-badge-dark-shadow.png" alt="Shopify secure badge" /></a>

Step 4:

Tap Save.

Insert the security badge code to your theme for non-sectioned themes

Step 1:

Go to Online Store > Themes from your Shopify admin panel. Or choose the theme you want to adjust and click Actions > Edit code.

Step 2:

In the next step, you need to paste the code for either the light or the dark security badge into the theme code. Paste the code into one of these following files, it depends on where you want to place the badge on your storefront:

- If you want the security badge to be displayed in your footer or header, then find your theme.liquid in the Templates directory

- If you want the security badge to be displayed on your product page, then find your product-template.liquid in the Sections directory

- If you want the security badge to be displayed in your cart page, then find your cart-template.liquid in the Sections directory or cart.liquid in the Templates directory

Step 3:

Tap the file to let it opened in the code editor. Find the location in the code where you want to insert your security badge in. You are able to experiment with pasting the code in separated places to see where the badge will be displayed on the store website.

- If you want the badge to be displayed in your header, then find a place between the opening tag and the closing tag

- If you want the badge to be displayed in your footer, then find a place between the opening tag and the closing tag.

Please paste in the code given below to add a light-colored badge:

<a href="//www.shopify.com/pci-compliant?utm_source=secure&amp;utm_medium=shop" title="This online store is secured by Shopify" target="_blank"><img src="//cdn.shopify.com/s/images/badges/shopify-secure-badge-light-shadow.png" alt="Shopify secure badge" /></a>

Please paste in the code given below to add a dark-colored badge:

<a href="//www.shopify.com/pci-compliant/?utm_source=secure&amp;utm_medium=shop" title="This online store is secured by Shopify" target="_blank"><img src="//cdn.shopify.com/s/images/badges/shopify-secure-badge-dark-shadow.png" alt="Shopify secure badge" /></a>

Step 4:

Tap Save.

Conclusion

We hope that you would find this instruction will help you insert the security badge to your theme. Please keep you eyes on our previous posts!


Sam Nguyen is the CEO and founder of Avada Commerce, an e-commerce solution provider headquartered in Singapore. He is an expert on the Shopify e-commerce platform for online stores and retail point-of-sale systems. Sam loves talking about e-commerce and he aims to help over a million online businesses grow and thrive.

Stay in the know

Get special offers on the latest news from AVADA.