Customize your store header
On this page
There are four ways to customize your store header. Pick the one that matches how much of the header you need to change.
-
Using the default menu which allows you to only adjust which product categories are shown in what order to the left of the Account menu option. How to do this is detailed in our Design site navigation for products help article.
-
Using the menu builder to customize the navigation completely while using the standard search and account login links. How to do this is detailed in our Menu builder help article.
-
Replacing the header menu HTML entirely, and optionally using the Menu Builder to control the navigation menu from Salesforce. This article covers this method.
-
Customizing the header snippet template in your theme. This is the best option if you already use a custom theme.
Replace the header with a content block
Use this method to replace the site header completely from Salesforce, without editing theme files. You need to be comfortable with HTML and Liquid.
-
Open the Store record and go to the CMS tab.
-
Click Header Content Block and create a new Content Block.
-
Select No added styling in the Content Template field.
-
Enter a Name for the content block.
-
Paste your header markup into the Content field. The boilerplate below reproduces a header close to the default one, and you can modify it from there.
-
Click Save.
-
Save the Store record.
The new header takes a few minutes to appear. Reload your storefront and confirm your header renders in place of the default one.
Header HTML and Liquid boilerplate
```liquid
-
{%- capture item_count %}
{%- if current_cart != blank and current_cart.item_count > 0 %}
-
{%- comment %} Dropdown {% endcomment %}
{%- if current_cart != blank and current_cart.items.size > 0 %}
{%- comment %} Line items {% endcomment %}{%- endif %}{%- render "shared/cart/items", source: current_cart, compact: true, width: "70px" %}{%- comment %} Cart total {% endcomment %}{%- render "shared/order_total", source: current_cart, compact: true %}{%- comment %} Checkout button {% endcomment %} {%- render "shared/cart/checkout_button", class: "SC-Button SC-Button-primary SC-Button-expanded" %}
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.