I found some useful forums showing how to open social media links in a new tap for the previous Dawn version.
I cannot figure out how to open my Instagram and TikTok Icons in a new tab using the previously recommended: target=‘_blank’
Perhaps it is still the same code, but I am not sure where to place it in the new “Footer Liquid” code.
Thanks in advance
I also have a button on my “About Us” page that links to my TikTok profile that I also wish to open in a new tab.
Thanks!
Hey @OsmosisJones ,
For the social links,
Look for the file “social-icons.liquid and add the target=”_blank" to all the social media icons you require
Screenshot for reference
5 Likes
Unfortunately, this only deleted the social media icons from my footer, and still opens in the same tab on my About Us page.
Hey @OsmosisJones ,
Please remove the code. It shouldn’t delete the icons unless the code wasn’t added properly. Can you share the store url?
Hey Prime, I rechecked the image you provided, and I forgot to end the line with a > after adding target=“_blank”.
The footer icons now work properly, but on the About Us page, the TIkTok BTS button still opens in the same tab.
The url is gravelbikeshop.com
password: shop4cross
Thank you for your time! We will be removing the store password shortly
Hey @OsmosisJones ,
No worries. Glad you managed to get it to work.
Edit: I saw the “Tiktok BTS” button, and that button is not included in the code I provided because it’s a custom button you added yourself, let me see if I can work out a method for you to open that in a new tab
Hey @OsmosisJones ,
In the Button settings on the Theme customizer please add the highlighted part.
and when it prompts to click on the URL, just click on it.
Or here’s the full URL to add.
https://www.tiktok.com/@gravelbikeshop" target="_blank"
2 Likes
Legend! Thank you so much for your time and help. It is time to launch the store!
I’ve spent the last 30 minutes scouring the internet for solutions to make my social media links open on a new tab and so many tutorials didn’t work for me until I found this solution you posted. Thank you so much!
Sponky
March 28, 2024, 2:51pm
13
It works perfectly! Thank you!
Thanks for this! Super easy to implement