Shopify Guides

Shopify Theme Customization: Header Icons & Clickable Brands Guide

As your dedicated Shopify migration expert at Shopping Cart Mover, I often see store owners grappling with similar challenges in optimizing their online presence. Recently, a query from Roman_S in the Shopify Community forum caught my eye. Roman, using the Horizon 3.1.0 theme, sought solutions for two common yet impactful customizations: refining the header layout and making product brands clickable on product pages. These aren't just aesthetic tweaks; they significantly enhance user experience and can even boost conversion rates. Let's delve into the community's insights and provide a comprehensive guide to implementing these changes effectively.

Shopify admin custom liquid section with code for clickable product brands
Shopify admin custom liquid section with code for clickable product brands

Elevating Your Shopify Header: Arranging Icons for Optimal UX

A well-organized header is crucial for intuitive navigation. Roman_S aimed to move the profile and cart icons to the top row, alongside the search icon, creating a streamlined search → profile → cart sequence. This seemingly simple change can make your store feel more polished and professional.

The "No Code Edit" (with a caveat) Approach

One popular suggestion from tim_1 in the forum involved a two-step process that attempts to minimize direct theme code edits:

  1. Adjust Theme Settings: Navigate to your Shopify Admin > Online Store > Themes > Customize. In the Header section properties, locate the "Search icon location" setting and change it to "Top row." This often places the search icon near your logo.

  2. Apply Custom CSS: To bring the other icons into alignment and potentially shift them, custom CSS can be added directly to the "Custom CSS" field within your Header section settings. The suggested code was:

    @media (min-width:750px) {
      .header__row--bottom .header__column--left {
        max-width: calc(100vw - 3 * var(--button-size) - 2* var(--page-margin)); 
      }
    
      search-button, header-actions {
        position: relative; 
        top: 50px; /* should match the height of the logo */
        z-index:5;
      }
    }

    Our Take: While this method leverages theme settings and custom CSS fields, it comes with considerations. Using position: relative with a fixed top value like 50px can be fragile. It assumes a fixed logo height and might not adapt well to different screen sizes or future theme updates. Moeed, another contributor, rightly pointed out that some solutions might not be "professional" as they can lead to unexpected layout issues or require constant adjustments. For truly robust and responsive header changes, understanding the underlying HTML structure and making more precise CSS adjustments (or even Liquid modifications) is often necessary.

Why Direct Theme Code Edits (or a Developer) Can Be Better

For complex layout adjustments, especially those involving the fundamental structure of your header, relying solely on custom CSS overrides can be a temporary fix. Direct modifications to your theme's Liquid files (e.g., header.liquid or related snippets) allow for more precise control over element placement and responsiveness. This is where a Shopify developer's expertise becomes invaluable, ensuring your customizations are stable, future-proof, and don't break with theme updates.

Enhancing Product Pages: Making Brand Names Clickable

The second excellent request from Roman_S was to make the product brand (vendor) name on product pages clickable, redirecting users to a collection page featuring all products from that brand. This is a fantastic user experience improvement, allowing customers to easily explore more from their favorite brands.

Implementing the Custom Liquid Solution

Tim_1 provided a clever Liquid code snippet that addresses this directly, without requiring extensive theme file edits, by utilizing a "Custom Liquid" block in the theme customizer:

  1. Remove the Default Vendor Block: On your product page template in the theme customizer, find the "Product information" section. If there's a default "Vendor" block, remove it.

  2. Add a Custom Liquid Block: Add a new "Custom Liquid" block to the "Product information" section where you want the brand name to appear.

  3. Paste the Liquid Code: Insert the following code into the Custom Liquid block:

    {% liquid
      assign co = collections | where: "title", product.vendor | first
      if co.products_count > 0
        assign url = co.url
      else
        assign url = product.vendor | url_for_vendor
      endif
    %}
    

    {{ product.vendor | link_to: url }}

    How it Works: This Liquid snippet first attempts to find a collection whose title exactly matches the product's vendor name (product.vendor). If such a collection exists and contains products, it uses that collection's URL. If not, it falls back to Shopify's default url_for_vendor filter, which generates a link to a search results page for that vendor. This ensures that the brand name is always clickable, directing users to the most relevant page.

    Important Note: For this solution to work optimally, ensure your brand collection titles exactly match your product vendor names. Consistency is key here!

Best Practices for Managing Brands and Collections

To maximize the impact of clickable brand names:

  • Consistent Vendor Names: Always use precise and consistent vendor names when adding products. Typos or variations will prevent the Liquid code from finding the correct collection.

  • Dedicated Brand Collections: Create a dedicated collection for each brand you carry. This not only supports the clickable brand feature but also provides a better browsing experience for customers interested in specific brands.

  • Automated Collections: Consider using automated collections based on the "Product Vendor" condition. This will automatically populate your brand collections as you add new products, simplifying management.

Your Customization Journey: A Few Words of Caution

While these customizations can significantly improve your Shopify store, remember a few golden rules:

  • Always Backup Your Theme: Before making any code changes, duplicate your live theme. This provides a safety net if anything goes wrong.

  • Test Thoroughly: After implementing changes, test them across different devices and browsers to ensure responsiveness and functionality.

  • Consider Professional Help: For complex or critical customizations, especially those affecting core navigation or user flows, engaging a Shopify expert or developer is a wise investment. They can ensure stability, performance, and long-term compatibility.

At Shopping Cart Mover, we understand that every detail counts in creating a compelling online store. Whether you're fine-tuning your current Shopify setup or planning a seamless migration to the platform, our expertise ensures your e-commerce vision comes to life. These community discussions highlight the power of small, thoughtful changes, and we're here to help you implement them flawlessly.

Need assistance with advanced Shopify customizations or considering a migration to unlock Shopify's full potential? Don't hesitate to reach out to the experts at Shopping Cart Mover. We're here to help you build an exceptional online shopping experience.

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases