Shopify themes, liquid, logos, and UX
Hello,
I'm currently working on optimising my website and would like to make a small adjustment to the social media links.
Currently, when users click on the social media icons in the announcement bar or footer, they open in the same window. However, I would prefer them to open in a new window or tab to ensure that visitors can easily return to my website after exploring my social media profiles.
Could you please assist me in configuring the social media links so that they open in a new window/tab?
This is my website: www.gastonduflos.com
Thank you for your attention to this matter.
Solved! Go to the solution
This is an accepted solution.
Hi @GASTY
- Go to Online Store -> Theme -> Edit code.
- Find the file Layouts/theme.liquid and paste the code below at the bottom of the file."
<script>
document.querySelectorAll('.list-social__link').forEach(function(link) {
link.setAttribute('target', '_blank');
});
</script>
Hi @GASTY
"Target="_blank" should be inside the <a> tag.
like this:
Thanks mate. I only want all the SOCIAL MEDIA ICONS to open on a new window, announcement bar and footer. Do you know how to achieve this? Thank you!
This is an accepted solution.
Hi @GASTY
- Go to Online Store -> Theme -> Edit code.
- Find the file Layouts/theme.liquid and paste the code below at the bottom of the file."
<script>
document.querySelectorAll('.list-social__link').forEach(function(link) {
link.setAttribute('target', '_blank');
});
</script>
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