Broken tag "0" is showing in header section

zero is showing in frontend top section

please help how to fix this

Hi @sagarweb,

Please go to Actions > Edit code > layout > theme.liquid file, find ‘0‘ and remove it.

If I helped you, then a Like would be truly appreciated.

Why the “0” is showing

  • It means there’s an extra number or text in the code you pasted.

  • That “0” is sitting outside of any HTML tags, so Shopify just shows it on your site.


How to fix it in 3 steps

  1. Open your theme code

    • Go to Online Store → Themes → Edit code

    • Open the file where you pasted the hamburger menu code (probably theme.liquid or header.liquid).

  2. Find the “0”

    • Scroll through the code and look for a single 0 or other text that’s not inside <div> or <script> tags.

    • It might be at the very top or bottom of what you added.

  3. Delete it

    • Remove that 0 and save.

    • Then refresh your store — the “0” will be gone.

This refers to the additional content adding in theme.liquid file. Please find zero tag in this liquid file and remove the related codes. After saving, it will be gone.

this is the full code I am unable to find the ”0” @namphan @Donahue @loetech

{% liquid

assign enable_rtl = settings.enable_rtl

assign language_support_rtl = settings.language_support_rtl

if enable_rtl and language_support_rtl != blank

assign shop_locale = localization.language.iso_code

assign language_support_rtl_list = language_support_rtl | split: ','

assign is_rtl = language_support_rtl_list | where: shop_locale

if is_rtl.size > 0

  assign enable_rtl = true

else

  assign enable_rtl = false

endif

endif

assign bg_color = settings.color_main_bg

assign has_bg = false

unless bg_color == ‘rgba(0,0,0,0)’ or bg_color == blank

assign has_bg = true

endunless

%}

<html

class=“no-js {% if settings.page_transition %} m:overflow-hidden{% endif %}”

lang=“{{ request.locale.iso_code }}”

data-template=“{{ template.name }}”

{% if enable_rtl %}

dir="rtl"

{% endif %}

>

<iframe src=" ns "

height=“0” width=“0” style=“display:none;visibility:hidden”>

<!-- Meta Pixel Code -->

<img height=“1” width=“1” style=“display:none”

src=“https://www.facebook.com/tr?id=2310195169747670&ev=PageView&noscript=1

/>

{%- comment -%}BEGINNING OF FlashSpeed. DO NOT EDIT! Autogenerated by FlashSpeed. ANY CHANGES WILL BE OVERWRITTEN AND/OR CAN BREAK THEME.{%- endcomment -%}

{% assign pagespeed_template_suffix_liquid = template.suffix | append: “.liquid” %}

{% assign pagespeed_page_type = template.name | replace: template_suffix_liquid, “” %}

{% unless request.page_type == ‘customers/register’ or request.page_type == ‘captcha’ or request.path contains ‘contact’ %}

{%- if blank -%}

<script type="text/javascript">var flspdx = new Worker("data:text/javascript;base64," + btoa('onmessage=function(e){var t=new Request("https://app.flash-speed.com/static/worker-min.js?shop=e6bdc6.myshopify.com",{redirect:"follow"});fetch(t).then(e=>e.text()).then(e=>{postMessage(e)})};'));flspdx.onmessage = function (t) {var e = document.createElement("script");e.type = "text/javascript", e.textContent = t.data, document.head.appendChild(e)}, flspdx.postMessage("init");</script>

<script type="text/javascript" data-flspd="1">var flspdxHA=\["hotjar","xklaviyo","recaptcha","gorgias","facebook.net","gtag","tagmanager","gtm"\],flspdxSA=\["googlet","klaviyo","gorgias","stripe","mem","privy","incart","webui"\],observer=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){if("SCRIPT"===e.tagName&&1===e.nodeType)if(e.innerHTML.includes("asyncLoad")||"analytics"===e.className)e.type="text/flspdscript";else{for(var t=0;t<flspdxSA.length;t++)if(e.src.includes(flspdxSA\[t\]))return void(e.type="text/flspdscript");for(var r=0;r<flspdxHA.length;r++)if(e.innerHTML.includes(flspdxHA\[r\]))return void(e.type="text/flspdscript")}})})}),ua=navigator.userAgent.toLowerCase();ua.match(new RegExp("chrome|firefox"))&&-1===window.location.href.indexOf("no-optimization")&&observer.observe(document.documentElement,{childList:!0,subtree:!0});</script>

{%- endif -%}

{% endunless %}

{%- comment -%}END OF FlashSpeed. {%- endcomment -%}

<meta charset="utf-8">

<meta http-equiv="X-UA-Compatible" content="IE=edge">

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=0">

<meta name="theme-color" content="{{ settings.color_primary }}">

<meta name="facebook-domain-verification" content="6q2ckxidbcpikad7tzr7zd6igtwgu3" />



{%- liquid

  render 'preload'

  render 'SEO'

  render 'social-meta-tags'

  render 'font-face'

-%}



{% render 'critical-css' %}

{% render 'custom-code-head' %}



{{ 'grid.css' | asset_url | stylesheet_tag }}

{{ 'base.css' | asset_url | stylesheet_tag }}

{{ 'modules.css' | asset_url | stylesheet_tag }}



{% render 'style-tags' %}





<script src="{{ 'vendor.min.js' | asset_url }}" defer="defer"></script>

<script src="{{ 'theme-global.js' | asset_url }}" defer="defer"></script>
{%- if settings.animations != 'none' -%}

  <script src="{{ 'animations.js' | asset_url }}" defer="defer"></script>

{%- endif -%}



{%- comment -%}BEGINNING OF FlashSpeed. DO NOT EDIT! Autogenerated by FlashSpeed. ANY CHANGES WILL BE OVERWRITTEN AND/OR CAN BREAK THEME.{%- endcomment -%}

{% assign pagespeed_template_suffix_liquid = template.suffix | append: “.liquid” %}

{% assign pagespeed_page_type = template.name | replace: template_suffix_liquid, “” %}

{{ content_for_header }}

{%- comment -%}END OF FlashSpeed. {%- endcomment -%}

<meta name="google-site-verification"content=“9wMcTnvGN5WOLo_MpW8_jKwC3SlU11HGSAHo8eTsJpg” />

<script>

  document.documentElement.className = document.documentElement.className.replace('no-js', 'js');

  if (Shopify.designMode) {

    document.documentElement.classList.add('shopify-design-mode');

  }

</script>



<script src="jquery-3.7.1.min.js"></script>
<!-- Meta Pixel Code -->

<img height=“1” width=“1” style=“display:none”

src=“https://www.facebook.com/tr?id=636063492172368&ev=PageView&noscript=1

/>

<style>

img[src*=“files/19.png”] {

  display: none !important;

}

<div id="m-theme"
class="template-{{ template.name | append: ' ' | append: template.suffix }}{% if settings.page_transition %} m:overflow-hidden{% endif %}"

{% if template.name == 'product' %}

  data-product-id="{{ product.id }}"

{% endif %}

{% if has_bg %} data-bg="{{ bg_color | color_to_hsl }}"{% endif %}

{% if settings.page_transition %}

  <div class="m-page-transition">

    <div class="m-page-transition__spinner">

      <div class="m-page-transition__spinner-content">

        <div></div>

      </div>

    </div>

  </div>

{% endif %}

{%- liquid

  render 'scroll-top-button'

  render 'theme-data'

  sections 'header-group'

-%}



<main role="main" id="MainContent">

  {{ content_for_layout }}

</main>



{%- sections 'footer-group' -%}



{% render 'script-tags' %}

{% render 'cookie-banner' %}

{% render 'custom-code-body' %}



<script src="{{ 'product-quick-view.js' | asset_url }}" defer="defer"></script>

<script src="{{ 'wishlist.js' | asset_url }}" defer="defer"></script>

<script src="{{ 'compare-product.js' | asset_url }}" defer="defer"></script>



{%- if settings.enable_predictive_search -%}

  <script src="{{ 'predictive-search.js' | asset_url }}" defer="defer"></script>

{%- endif -%}



{%- if linklists\['gift-wrapping'\].links != blank

  and linklists\['gift-wrapping'\].links.first.type == 'product_link'

-%}

  <script src="{{ 'gift-wrapping.js' | asset_url }}" defer="defer"></script>

{%- endif -%}



{%- if settings.show_swatch_option -%}

  <script src="{{ 'product-card-swatch.js' | asset_url }}" defer="defer"></script>

{%- endif -%}  



{%- if settings.enable_cart_drawer and template != 'cart' -%}

  {% render 'cart-drawer' %}

{%- endif -%}

{{ ‘//cdn.shopify.com/s/files/1/0194/1736/6592/t/1/assets/booster-page-speed-optimizer.js?23’ | script_tag }}

{% render ‘razorpay-magic-x’ %}

<style>

.m-add-to-cart {

  display: none !important;

}

<style>

.shopify-payment-button__button {

  border: 1px solid black !important; /\* Change color if needed \*/

  border-radius: 4px; /\* Optional: Adds rounded corners \*/

  padding: 10px 20px; /\* Optional: Adjusts padding \*/

}

<style>

.shopify-payment-button__button {

  border: 2px solid black !important; /\* Change color if needed \*/

  border-radius: 4px; /\* Optional: Adds rounded corners \*/

  padding: 10px 20px; /\* Optional: Adjusts padding \*/

}

/\* Reduce space between dropdowns \*/ .form-field { margin-bottom: 2px !important; /\* Minimal spacing \*/ padding: 5px !important; /\* Adjust padding if needed \*/ } /\* Reduce space above "Buy it now" button \*/ .shopify-payment-button { margin-top: 2px !important; } /\* Reduce space between all sections inside the product form \*/ #product-form-template--18247920386226__featured_product_MRcxNi select, #product-form-template--18247920386226__featured_product_MRcxNi button { margin-top: 2px !important; margin-bottom: 2px !important; } /\* Mobile-specific spacing adjustments \*/ @media screen and (max-width: 768px) { .form-field { margin-bottom: 1px !important; /\* Almost no space on mobile \*/ padding: 4px !important; } .shopify-payment-button { margin-top: 1px !important; } #product-form-template--18247920386226__featured_product_MRcxNi select, #product-form-template--18247920386226__featured_product_MRcxNi button { margin-top: 1px !important; margin-bottom: 1px !important; } } span.m-menu-button.m\\:flex.m\\:flex-1.m\\:w-3\\/12 { display: block !important; } header.m-header__mobile.container-fluid.m\\:flex.m\\:items-center { justify-content: space-between !important; } .m-hamburger-box__inner { background: white !important; } .m-hamburger-box__inner:before, .m-hamburger-box__inner:after { background: white !important; } .m-logo__image-default.m-image img { width: 100% !important; max-width: 50% !important; }
<style>

@media screen and (min-width: 768px) {

div#shopify-section-sections–18168767086770__header {

margin-bottom: -72px !important;

}

}

<script>

window.addEventListener(‘load’, function () {

var buyNowBtn = document.querySelector('.buy-now_btn');

if (buyNowBtn) {

  buyNowBtn.style.display = 'inline-block'; // or 'block' depending on layout

}

});

<!--Popup start-->




{% if template contains 'product' %}
#popup-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.6); display: none; justify-content: center; align-items: center; z-index: 9999; } #popup-box { position: relative; max-width: 500px; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); } #popup-box img { width: 100%; display: block; } #popup-close { position: absolute; top: 10px; right: 10px; background: #ff4444; color: white; border: none; font-size: 18px; border-radius: 50%; width: 30px; height: 30px; cursor: pointer; }
<div id="popup-box">

  <button id="popup-close">&times;</button>

  <img src="https://cdn.shopify.com/s/files/1/0638/3547/2050/files/pop_up_1_1.png?v=1751373939" alt="Official Payment Advice">

</div>

{% endif %}

<!--Popup end-->



<!-- WhatsApp Floating Button Start -->

{% if template contains ‘product’ %}

<a href=" https://api.whatsapp.com/send?phone=918448855346 " target="\_blank" style="display: inline-block;">

  <img src="https://img.icons8.com/color/96/000000/whatsapp--v1.png" 

       alt="WhatsApp" 

       style="width: 65px; height: 65px;" />

</a>

{% endif %}

I found the 0 error. can i help you to fixed it

I found the 0 error can i help to fix

yes why not I will be very grateful to you

1 Like

@loetech yes why not I will be very grateful to you

you will add me to the store as a staff. Did you know how to do that?

The “0” is not an error from Shopify, it’s just a stray character inside your code.

1 Like

@loetech Can I send you the meeting link or can you use ultra viewer of screen access

okay good. Can you send me the store login to access pls.

1 Like

@loetech https://meet.google.com/uck-wdoi-ysu please join the meeting

1 Like

ok good. Appreciate your support for give me access

1 Like

Hi @sagarweb,

Did you solve it?

1 Like

@sagarweb It seems like there is no “0” displaying in your header section anymore after my checking. Congratulations!

2 Likes