Get Free Audit

How to Edit Shopify Header

Aug 13, 2020

84381 Dmitriy Parhomenko

How to Edit Shopify Header

The topic of this article is Shopify header configuration. We briefly discuss the typical website page structure and then move to the main configuration steps: adding logo and changing Shopify logo size, header menu, announcement bar, creating a sticky header either including an announcement bar or excluding it. As a bonus, we are going to tell how you can edit Shopify header via code template. Let’s get started!

Shopify header block
How to edit Shopify logo in header
How to edit Shopify header menu
How to edit Shopify announcement bar
How to edit Shopify header via code template
How to create sticky header Shopify

Shopify website page can be divided into a few components:

1. Header. It is a content block that you can see at the upper part of every page of an online store. Header typically consists of a name of a store, logo, main website navigation menu and shopping cart sign.
2. Footer. It is a content block that you can see at the bottom part of every page of an online store. A footer may contain a menu, links to social networks, contact information and sometimes also a newsletter signup.
3. Body. It is an area between header and footer on any page of a website. Header or footer are static elements – they remain the same on every page. Compared to them, the web page body is dynamic and its content changes depending on the page that you access.

In this article, we are going to discuss the header block and how you can configure its components.

In case you are interested in the footer block configuration – visit this page and find everything you need in a comprehensive guide.

You can also check out creating a menu in Shopify tutorial to improve navigation.

Shopify header block

In Shopify, the header looks like this:

 

shopify header configuration step by step

 

Basically, it can be divided into 2 blocks. The first block is an announcement bar. It contains a welcome message. The second block contains a logo, menu, search bar and a shopping cart.

In order to edit the header block, you need to enter the admin panel of your website and then go to Online Store -> Themes.

 

how to remove header from product page shopify

 

Then, you need to select your current theme and press the Customize button.

 

shopify logo size in header

 

Here you will see the block with your website’s sections (header, footer etc). You need to select the header section.

 

shopify header bar configuration

 

Now, let’s take a look at the main Shopify capabilities for the header block customization.

 

header in shopify customization

 

How to edit Shopify logo in header

The first element that you can change in the header is the logo. You can change its location by selecting one of the suggested options (Left, Center). Besides uploading your own logo from your device, you can choose one of the free options available by pressing on Explore free images.

 

shopify header logo

 

In our article, we will choose the second option and go for a ready-made logo image.

 

shopify header logo size config

 

After you apply a new image, three buttons will show up:

  1. Change will let you choose another image;
  2. Remove allows you to delete the image;
  3. Edit is the button that allows adding a brief image description (it will be placed in the alt attribute). Alt description is necessary for SEO as images also show up in search results by relevant queries and also it is important for visually impaired website visitors.

You can also configure Shopify logo size

 

shopify logo size width

 

How to edit Shopify header menu

The next element that we discuss here is your website’s main menu.

 

shopify header menu config

 

By default, the main menu is selected. You can choose another menu by pressing on the change button or edit the current menu by pressing the Edit menu button.

 

main shopify menu configuration

 

In the menu editing section, you can create new menu items as well as edit the existing ones. You can also use the drop down menu to group products, collections or pages to improve your online store’s navigation. For example, if you have a lot of products, you can add them to collections and use the drop down menu to organize these collections. It will help a customer to find a necessary product type. You can create a drop down menu by creating or moving sub menu items under the main item. The main item will be displayed in your store’s main menu and sub menu items will be displayed in the drop down menu. There can be 2 levels of sub menu sections.

For example, let’s create a menu item connected to a website page can place 2 more items inside of it:

 

shopify header menu creating

 

You should pay attention that the 1st-level menu items are left-aligned. The 2nd-level menu items are aligned among themselves but indented to the 1st level menu items.

On the front, it will look like this:

 

shopify header creating navigation

 

It is also worth mentioning that you can edit the menu directly from the admin panel main menu. Just go to online store -> navigation.

 

shopify navigation improvement

 

How to edit Shopify announcement bar

The next block that you can edit is an announcement message.

 

shopify announcement bar

 

By default, this block is hidden but you can make it visible by clicking on show announcement. You can also display this block just on a main page. In order to do it, you need to tick the box saying Home page only.

In the text field, you can change the message text.

In the link field, you can mention the website page that a user will proceed to when clicking on this block. You can also change the block’s color and text’s color.

How to edit Shopify header via code template

You can edit the header block directly via code. In order to do it, go to Theme actions -> Edit code.

 

announcement bar shopify configuration


After you enter the section with templates of your theme, you need to open the header.liquid template in the sections.

 

change announcement bar shopify

 

Using Shopify layout and HTML, you can change blocks’ location, remove blocks, add your own classes and attributes etc. To edit styles in the Assets, you need to select the theme.scss.liquid file.

 

announcement shopify bar edit

 

How to create sticky header Shopify

Sticky header means that the navigation, logo and icons will follow the users while scrolling the page. It is very useful when you want your customers to have easy access to your website’s navigation. Let’s look through 2 ways how you can create a sticky header in Shopify. In the first case, the whole header will be sticky (together with an announcement bar); in the second case, the announcement bar won’t be sticky – won’t be fixed.

Making the whole header sticky (together with an announcement bar)

  1. At the Shopify admin panel, you need to enter Online Store > Themes.
  2. Here you need to find your theme and press Actions > Edit code.
  3. In the Assets folder, you need to open the theme.scss.liquid file.
  4. Proceed to the very end of this file and insert this code:

  • In the Assets folder, you need to open the theme.js file.
  • Proceed to the very end of this file and insert this code:


After that, you need to save the changes and reload your website page.

Making the header sticky excluding the announcement bar

If you want the announcement bar not to be fixed with the sticky header, you need to follow these steps:

  • In the Shopify admin panel, go to Online Store > Themes.
  • Here you need to find your theme and press Actions > Edit code.
  • In the Assets folder, you need to open the theme.scss.liquid file.
  • Proceed to the very end of this file and insert this code:

  • In the same Assets folder, you need to open the theme.js folder.
  • Proceed to the very end of this file and insert this code:


 

Vlad Yunusov
Partner With Us Looking for a partner to grow your business? We are the right company to bring your webstore to success. Talk to Vlad

1 comment

  1. Love you all of you because you solve my biggest header problem. Thanks to your team.

Post a new comment

BelVG Newsletter
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
Email *