Link Logo to Product Page in Minimal Theme

Solved
Highlighted
Tourist
6 0 0

Hello Community! I'm new and I'm super happy to be here!


I'd like to link my logo to the product page, I'm using the Minimal Theme, I tried so hard by myself but no results AT ALL!

 

Which part of the code is the Home page link? And what should I write to link it to the Product Page?

 

Thanks to everybody : )

0 Likes
Highlighted
Astronaut
1085 178 213

Hello,

Thank you for your question. 

Please share your store URL, page URL and also password (if your store has one) so we can help you.

Kind regards,
Diego

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
1 Like
Highlighted
Highlighted
Astronaut
1085 178 213

Thank you,

Just to make it clear, when the customer clicks on the logo you want it to go to that specific product page, correct?

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
0 Likes
Highlighted
Tourist
6 0 0

Exactly, the logo should bring to the product page! Exactly as the write "!!! LET'S ROCK FREELY!!!" does. I'd like to emulate a one-page website so I want all link only brings to the Product page.

 

Thanks

Alessandro Zerbini

0 Likes
Highlighted
Astronaut
1085 178 213

1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:

<script>
function setLogoHref(){
var logo = document.querySelector(`.site-header__logo a`);
var url = `https://guitarwireless-com.myshopify.com/products/muslady-2-4g-wireless-guitar-transmitter-receiver-wireless-transmitter-guitar-rechargeable-battery-30m-black-silver-1`;

if (!logo)return
logo.setAttribute('href', url);
}

setTimeout(setLogoHref, 50);
</script>



Let me know whether it works.

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
1 Like
Highlighted
Tourist
6 0 0

this is odd but is works just "sometimes", if I click the logo once it work but if I click it again it it bring me back to the old home page.

 

 

and I show this not good anyway as final solution as global result, there is a way to set the product page as home page?

 

Thanks

0 Likes
Highlighted
Tourist
6 0 0

Anyway thank you for what you have done so far, but there is a way to do it with a pointer instead of with a variable, so the if I change the URL it will point there anyway?

 

Thank

 

Alessandro Zerbini

0 Likes
Highlighted
Astronaut
1085 178 213

Yes, in the code that I sent you you can see there is an URL, change that to anything you'd like

please don't forget to click on the button "Accept as Solution" below my answer to help other people in the community with similar issues.

 

Kind regards, 

Diego

◦ Problem Solved? ✔️ Please click on Accept as Solution and like.
◦ Hire me! Recommended by 25+ customers on Facebook. Click here to read their reviews.
◦ Contact me at: diego.boarutto.fortes@gmail.com
0 Likes
Highlighted
Tourist
6 0 0

Sure, thank you

 

I would be happy to accept this as a solution, but it works just the first time I click on the home page if I click it a second time it brings back to the original home page.

 

Thanks you 

Alessandro Zerbini

 
0 Likes