Can anyone PLEASE help me put a line of code in my header

New Member
11 0 0

Hi folks

Just hoping a good samaritan can help!

In my header I have "account", "search" and "cart" images.  I want to use a line of code from TrustPilot (a review website) to put a logo linking to their reviews site in, but with my very basic code knowledge, I don;t know where I''d put it in the Brooklyn theme.

Ideally I'd like it as the final symbol

Can anyone help? 

Thanks!

0 Likes
Highlighted

Hello Glen,

You need to add TrustPilot logo to Assets file (svg would be great, size 20x20 or so).

Then open Sections / header.liquid and after this code (it would be 242 line or so)

<li class="site-nav__item site-nav__item--compressed">
  <a href="/cart" class="site-nav__link site-nav__link--icon cart-link js-drawer-open-button-right" aria-controls="CartDrawer">
    <span class="icon-fallback-text">
     <span class="icon icon-cart" aria-hidden="true"></span>
     <span class="fallback-text">{{ 'layout.cart.title' | t }}</span>
    </span>
    <span class="cart-link__bubble{% if cart.item_count > 0 %} cart-link__bubble--visible{% endif %}"></span>
   </a>
</li>

 

paste this code (with your link in href="..." and file name inside {{...}})

<li class="site-nav__item site-nav__item--compressed">
 <a href="YOUR LINK HERE" class="site-nav__link site-nav__link--icon">
    {{ 'YOUR FILE NAME' | asset_url | img_tag }}
  <span class="icon-fallback-text">
   <span class="fallback-text">TrustPilot</span>
  </span>    
 </a>
</li>

so the new code should be just before this code:

</ul>
<!-- //site-nav -->

 

Hope it helps!
Best regards,
Arthur

Shopify subject matter expert | Founder at GenovaWebArt | Full-services shopify agency | info@genovawebart.com
0 Likes