Add a link to header logo

Solved

Add a link to header logo

kschulze
Excursionist
43 2 11

Hi,

how can I add a link to the header logo?

If someone cklicks it, he should be redirected to https://stein-experte.de/collections/all

 

kschulze_0-1745654137769.png

kind regards

Karsten

Karsten
Accepted Solution (1)

tim
Shopify Partner
4458 530 1629

This is an accepted solution.

Your sections/header.liquid should have a line like this:

<a href="{{ routes.root_url }}" class="header__heading-link link link--text focus-inset">

similar to https://github.com/Shopify/dawn/blob/9.0.0-release-branch/sections/header.liquid#L439 
 

change it to 

<a href="{{ routes.all_products_collection_url }}" class="header__heading-link link link--text focus-inset">

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

View solution in original post

Replies 4 (4)

BiDeal-Discount
Shopify Partner
411 45 90

I think you have to edit in code for this. 

- Helpful? Like & Accept solution!
- BiDeal Bundle Volume Discounts: Upsell with bundles, quantity breaks, volume discounts. AOV+ with gifts, shipping & progressive cart
- Bify app: Shopify automatic discount solutions
- Contact me? support@bify.app or WhatsApp: +84974709330

Muhammad_Ali_S
Shopify Partner
670 122 185

@kschulze 
It can be done by editing theme code. Do let me know if you need assistance.

Ali Shahzad | Designer | Developer
- Was my reply helpful? Click Like and Accepted Solution to let me know!
- Feel Free to Contact | Whatsapp +92 3486775142

tim
Shopify Partner
4458 530 1629

This is an accepted solution.

Your sections/header.liquid should have a line like this:

<a href="{{ routes.root_url }}" class="header__heading-link link link--text focus-inset">

similar to https://github.com/Shopify/dawn/blob/9.0.0-release-branch/sections/header.liquid#L439 
 

change it to 

<a href="{{ routes.all_products_collection_url }}" class="header__heading-link link link--text focus-inset">

 

If my post is helpful, hit the thumb up button -- it will help others with similar problem to find a solution.
I can be reached via e-mail tairli@yahoo.com

devcoders
Shopify Partner
1412 168 442

Hello @kschulze 

Find your header.liquid (or header section file) inside your Shopify theme.

Look for the logo code — it usually looks something like this:

{% if settings.logo %}
  <img src="{{ settings.logo | img_url: 'medium' }}" alt="{{ shop.name }}">
{% endif %}


Wrap that img inside an <a> tag like this:

{% if settings.logo %}
  <a href="https://stein-experte.de/collections/all">
    <img src="{{ settings.logo | img_url: 'medium' }}" alt="{{ shop.name }}">
  </a>
{% endif %}




Shopify Developer: Helping eCommerce Stores
If you need assistance with your store, feel free to contact us at devcodersp@gmail.com
WhatsApp No: +91 8516919310 If my assistance was helpful, please consider liking and accepting the solution. Thank you!