How to Comment in Stencil Themes for BigCommerce

A forum request to comment out code in a BigCommerce Stencil theme leads to it still displaying on the website.

Problem

HI, I would like to remove the address in the Footer, i am using Lifestyle theme. I have "comment" in the Edit Theme --> Component --> Common --> Footer

 

      <!--{{#if settings.address}}-->

      <!--<article class="footer-info-col footer-info-col--small" data-section-type="storeInfo">-->

      <!--  <h5 class="footer-info-heading">{{lang 'footer.info'}}</h5>-->

      <!--  <address>{{nl2br settings.address}}</address>-->

      <!--  {{#if settings.phone_number}}-->

      <!--    <strong>{{lang 'footer.call_us' phone_number=settings.phone_number}}</strong>-->

      <!--  {{/if}}-->

      <!--</article>-->

      <!--{{/if}}-->

 

however it does not work. Can someone point please enlighten me and how to fix it?

Solution

These HTML comments are being skipped over by handlebars, which need to be formatted like:

{{!-- #if settings.account.address --}}


Alternatively, you could just delete the entire section you are trying to comment out, it won't effect anything.

Tags

Stencil Theme, BigCommerce, Design

Dated

Created: 17 Jun 2024

Updated: 22 Jun 2024

We are not just building websites; we are forging long-term partnerships.

© 2012-2024. Brod Solutions LLC. All rights reserved.