How to open a social media icon in a new tab using the Studio theme?

Solved

How to open a social media icon in a new tab using the Studio theme?

arg99
New Member
5 0 0

Hi, Can someone please help us open the social media icon in a new tab? We are using the Studio (4.0.1) theme. Thanks

Accepted Solution (1)

Dan-From-Ryviu
Shopify Partner
9145 1829 1864

This is an accepted solution.

Hi @arg99 

You can do that from store admin > Sale channel > Online store > Themes > Edit code, open social-icons.liquid file, add this type of code 

target="__blank"

Right after all code like this 

<a 

Screenshot 2024-08-14 at 14.53.26.png

 Save your file

- Helpful? Like and Accept solution! ‌Support me: Buy coffee
- Ryviu - Reviews & QA app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

View solution in original post

Replies 6 (6)

ProtoMan44
Shopify Partner
608 54 91

@arg99  please put this attribute to all social A tag:

target="_blank"

it will open a link in new tab.

 

- A thirsty developer passionate about supporting the community. If you'd like to, you can  

Buy me a Coffee.


- Your Shopify Solution Specialist Get a Quote at

ProtoMan44

 - 

Chat On Whatsapp


Crafting exceptional e-commerce experiences to elevate your online presence. Let's build your success story together!
arg99
New Member
5 0 0

where do i put the tag?

 

Captura.JPG

ProtoMan44
Shopify Partner
608 54 91

@arg99 

@arg99 please search social in you theme file , it is a snippet the check <a> tags and put (target="_blank") to all a tags. like this:

ProtoMan44_0-1723629476049.png

 

 

- A thirsty developer passionate about supporting the community. If you'd like to, you can  

Buy me a Coffee.


- Your Shopify Solution Specialist Get a Quote at

ProtoMan44

 - 

Chat On Whatsapp


Crafting exceptional e-commerce experiences to elevate your online presence. Let's build your success story together!

niraj_patel
Shopify Partner
2378 514 511

Hello @arg99 

Here is an Example:
<a href="{{ social_media_link }}" class="social-icon" target="_blank" > <!-- Icon code --> </a>

Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it as an Accepted Solution.

Shopify Partner || Helping eCommerce Stores
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution.
- For further discussion contact: Email ID- info@techlyser.com

Dan-From-Ryviu
Shopify Partner
9145 1829 1864

This is an accepted solution.

Hi @arg99 

You can do that from store admin > Sale channel > Online store > Themes > Edit code, open social-icons.liquid file, add this type of code 

target="__blank"

Right after all code like this 

<a 

Screenshot 2024-08-14 at 14.53.26.png

 Save your file

- Helpful? Like and Accept solution! ‌Support me: Buy coffee
- Ryviu - Reviews & QA app, collect product reviews, import reviews from AliExpress, Amazon, Etsy, Walmart, Shopee, Dhgate and CSV.
- Lookfy app: Easy and fast to create Photo Gallery, Lookbook, Shop The Look.
- Reelfy‑Shoppable Videos+Reels: Create shoppable videos to engage customers and drive more sales.
- Enjoy 1 month of Shopify for $1. Sign up now.

arg99
New Member
5 0 0

it was on "footer.liquid" file