Shopify themes, liquid, logos, and UX
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!
Solved! Go to the solution
This is an accepted solution.
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...
Hi @pearlerwork
It can be but must to edit your theme liquid file for this function.
- Helpful? Like and Accept solution! OR Buy me coffee ❤️
- Ryviu - Reviews & QA app: Collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy Gallery: Lookbook Image: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Ryviu: Aliexpress Reviews - AliExpress Reviews Importer, one-click import aliexpress reviews, export reviews to CSV file.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.
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.
Contact paull.newton+shopifyforum@gmail.com for the solutions you need
Save time & money ,Ask Questions The Smart Way
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Thank Paul with a ☕ Coffee for more answers or donate to eff.org
@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!
This is an accepted solution.
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!
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024