Web Development

Custom Homepage HTML code section for Shopify

Sometimes you may need to put some html code in the Homepage of your shopify site. Here I am sharing you the steps and code to create custom html section.

Create home-custom-html.liquid file under section ( screenshot attached )

Paste this code in the newly created home-custom-html.liquid

<div id="section-cta">
  <div class="container">
    {{ section.settings.text }}  
    
  </div>
</div>
{% schema %}
{
  "name": "HomePage Custom HTML",
  "settings": [
    {
      "id": "text",
        "type": "html",
        "label": "Add custom html below",
        "default": "<p>Add your text here</p>"
    } 
  ],
  "presets": [
    {
      "name": "HomePage Custom HTML",
      "category": "Custom HTML"
    }
  ]
}
{% endschema %}

{% stylesheet %}
{% endstylesheet %}

{% javascript %}
{% endjavascript %}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s