Como adicionar um link dinâmico a uma imagem ou texto

How to add a dynamic  link to image or text

Adicione um link dinâmico, ou seja, link exclusivo, a qualquer imagem ou texto em seu site usando a ferramenta de inspeção para desenvolvedores. Shopify usa forloop, e se você alterar algo em um lugar, isso definitivamente se aplicará a todos, mas podemos mudar isso usando o esquema json. Veja o vídeo para mais informações.

Você pode ver a documentação do Chrome DevTools aqui . Para Mozilla Firefox, você pode verificar a documentação aqui .

Etapa 1: descubra onde colocar o href

Etapa 2: abra o editor de código do Shopify

Etapa 3: localize o arquivo HTML

Etapa 4: Encontre o html dentro do arquivo

Etapa 5: adicione o código href

Etapa 6: adicione um link dinâmico

6 comentários

Hi @Jade,

Unfortunately, you might not had followed the instructions well. You are missing the link. We will be glad to help you, however, please note that service may require payment for the time invested

Made4Uo

Hello, I followed everything in the video. I have the image link and selected my collection but it still takes me to homepage. How can this be resolved?

Jade

Hi @CHERYL,

Some sections uses multiple type blocks. The code provided in the video will not work.

Made4Uo

Hello!
I’ve hit a snag with this code…i’m trying to utilize it for the footer – adding a link to an image in the footer. The a href code works, but as soon as I enter the code under the settings in schema I get an error saying it’s an invalid code. I’ve entered it the same as above. I would really appreciate any assistance with this.
Thanks!

Cheryl

Yes, you have to add the text-decoration: none and color.

Made4Uo

Thank you for your video. I entered the code for Multi-column image and it worked. I tried it for Image With Text. If I make the image clickable, it works. If I try to make the text clickable, the text becomes underlined in blue. Is there a way to prevent the text from being underlined in blue? Do I have to add the CSS text-decoration: none ?
Thanks.

Diane Meyer

Deixe um comentário