Link Header Logo to Somewhere Different on Certain Pages

We’ve got a different logo and branding to show on certain pages. See below link:

https://www.findmenowthelabel.com/

Any ideas how we may be able to make it so that the logo on certain page templates goes to a different URL?

Page: https://www.findmenowthelabel.com/pages/second-skin

Collection template: https://www.findmenowthelabel.com/collections/second-skin-dresses

Product template: https://www.findmenowthelabel.com/collections/second-skin-dresses/products/fa3602dr

Thank you!

Hi @pearlerwork

It can be but must to edit your theme liquid file for this function.

Hi @pearlerwork That would be an advanced theme customization.

If you need this customization then contact me by mail for services.
ALWAYS please provide context, examples: store url, theme name, post url(s) , or any further detail in ALL correspondence.
Contact info in signature.

To DIY you’d need to find the logo&link code in the theme files for the header, header.liquid or similar, and override/replace the default logic that just inserts the logo and shop.url.

You’d probably want to set these as metafields to simplify logic otherwise if you have many of these logo/link replacements you’ll end up with an unmanageable amount of if statements.

Something like the following logic you’d need to adapt to fit the themes html:

{% if page.metafields.branding.logo_link != blank and  page.metafields.branding.logo_image != blank %}
{{page.metafields.branding.logo_link }}
{{page.metafields.branding.logo_image }}
{% endif %}

Good Hunting.

@pearlerwork - it can be done, it will need code editing, the thing is how many pages do you have where you want different links? if there are too many then it would not be feasible , if few pages only then code will work easily.

Thank you. This is the rule that would be best to apply if that helps?

{% if page.handle contains 'second-skin' or collection.handle contains 'second-skin' or template.name == 'secondskin' %}

Hi @pearlerwork

Request you to refer to the below video to impliment the same.

Hope this will help…

Thank you. I had already changed the logo image, it’s just the link location I’d like to change the destination of. So I’d like it to go to a different URL than the homepage!

use the below code in header.liquid

{%liquid assign logoLink = routes.root_url
  if collection.template_suffix == "different-logo"
    assign logoLink = "https://gitagshop.myshopify.com/blogs/news"
  endif 
%}

and replace all href=“{{ routes.root_url }}” with href=“{{ logoLink }}” in header.liquid

please refer to the below screenshot for reference

Hope this will help…

Thanks for completing this work. It functions perfectly now!