Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello!
I'm using Pipeline and I'm not sure how to edit the social icons to be opened in a new window..
I did those changes accordingly to these guidelines, but it's not working (see screenshot).
Please help 😞
Our current code is:
{% if section.settings.footer_social_enable %}
<ul class="footer-social social-icons grid__item inline-list">
{%- assign social_accounts = 'Facebook, Twitter, Tiktok, Pinterest, Instagram, Snapchat, Tumblr, Linkedin, YouTube, Vimeo, Medium, ' | split: ', ' -%}
{%- for social in social_accounts -%}
{%- assign social_handle = social | handleize -%}
{% capture social_link %}social_{{ social_handle }}_link{% endcapture %}
{%- if settings[social_link] != blank -%}
<li>
<a href="{{ settings[social_link] }}" title="{{ social }}">
{% render 'social-icon' handle: social_handle %}
<span class="visually-hidden">{{ social }}</span>
</a>
</li>
{%- endif -%}
{%- endfor -%}
Solved! Go to the solution
This is an accepted solution.
Hi @Huyen_kire ,
"target" is an attribute of element <a>, that specifies where to open the linked document, in this tab, in new tab, etc, detailed here
If you want to open a new tab when click the link, you just need to set "target=_blank" into <a> like the following example
before:
<a href="https://www.google.com/"></a>
after adding target
<a href="https://www.google.com/" target="_blank"></a>
So, find all <a> elements in your footer and add this property (note that you need to add in the open tag of a HTML element - <a>, not the close tag </a>)
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
This is an accepted solution.
Hi @Huyen_kire ,
"target" is an attribute of element <a>, that specifies where to open the linked document, in this tab, in new tab, etc, detailed here
If you want to open a new tab when click the link, you just need to set "target=_blank" into <a> like the following example
before:
<a href="https://www.google.com/"></a>
after adding target
<a href="https://www.google.com/" target="_blank"></a>
So, find all <a> elements in your footer and add this property (note that you need to add in the open tag of a HTML element - <a>, not the close tag </a>)
If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here ☕.
B2B Solution & Custom Pricing | Product Labels by BSS
Need help from our expert? Kindly share your request with us via community@bsscommerce.com
Amazing, it's working now. Thank you!!!
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024