Hi,
I need help modifying the last link in the header and the social buttons in the footer so that they open in a new window when clicked. Currently, they are opening in the same window.
store link: https://testingstoresandthemes.myshopify.com/
password: lock
Attaching a screenshot for reference.
Topic summary
A Shopify store owner needed help making external links open in new windows, specifically for the last header link and social media buttons in the footer.
Initial Solution:
- BSSCommerce-HDL provided JavaScript code to insert above the
</body>tag in the theme.liquid file - This successfully fixed the footer links but the header link still opened in the same window
Updated Solution:
- A second code snippet was provided targeting the header link specifically
- After the user updated the menu item title and link, the code stopped working
- BSSCommerce-HDL provided a revised markup/code solution
Resolution:
The issue was successfully resolved with the final code update. The user expressed gratitude for the assistance.
Hi @technase ,
Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above tag:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you ![]()
Thank you.. it addresses the links in the footer but the one in header still opens in same window.
Hi @technase ,
Step 1: Go to Shopify Admin → Online Store ->Theme → Edit code
Step 2: Search file theme.liquid
Step 3: Insert this code above tag:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you ![]()
Hey,
I am so sorry, I updated the menu item title and link, and this code seems to be not working. Would you be able to provide me with the updated code to resolve this?
Thank you so much for all your help!
Hi @technase , Pls try with this code:
Hope this can help you,
If our suggestions are useful, please let us know by giving it a like or marking it as a solution. Thank you ![]()
Thank you so much ![]()
@technase , No problem. Have a good day ![]()

