I’ve been searching for weeks, but I haven’t found a solution for what I want to do. I’m trying to setup my store so that all links in the navigation menu in the header and the footer all open in the current tab. Currently, internal links open in the current tab, but external links open in a new tab. The store is a subdomain of my main website and they share some of the same links. I’m trying to make it feel like one website, but it gets confusing for customers when some pages open in the current tab and others open in a new tab. Eventually, customers could easily have 4 or 5 tabs open with no back button functionality. All links opening in the current tab would solve everything.
I’m using the Minimal Theme that has been customized quite a lot to somewhat match my main website. So, I’m comfortable with editing code, etc. The links to both sites are:
I would appreciate and help our suggestions in regards to a solution to my problem.
You can try this code by following these steps:
Step 1: Go to the online store ->Theme ->Edit Code.
Step 2: Find the header.liquid file and the footer.liquid file. Remove the target attribute of the tag
If I “inspect” the page via Google Chrome I have found the link that you screenshot. However, when looking at the header.liquid and footer.liquid the html links are not shown so I can’t edit them. I’ll post the header and footer.
HEADER
{%- assign logo_width = 695 -%}
{%- assign logo_max_width = section.settings.logo_max_width | times: 1 -%}
{% if logo_max_width < logo_width %}
{%- assign logo_width = logo_max_width -%}
{% endif %}
.logo__image-wrapper {
max-width: {{ logo_width }}px;
}
/*================= If logo is above navigation ================== */
{% if section.settings.nav_below_logo %}
.site-nav {
{% if section.settings.show_header_lines %}
border-top: 1px solid {{ settings.color_borders }};
border-bottom: 1px solid {{ settings.color_borders }};
{% endif %}
margin-top: 30px;
}
{% unless section.settings.left_aligned_logo %}
.logo__image-wrapper {
margin: 0 auto;
}
{% endunless %}
{% endif %}
/*============ If logo is on the same line as navigation ============ */
{% unless section.settings.nav_below_logo or section.settings.show_header_lines == false %}
.site-header .grid--full {
border-bottom: 1px solid {{ settings.color_borders }};
padding-bottom: 30px;
}
{% endunless %}
{% unless section.settings.nav_below_logo %}
@media screen and (min-width: 769px) {
.site-nav {
text-align: right!important;
}
}
{% endunless %}
{% if section.settings.show_announcement or section.settings.header_search_enable %}
{% comment %}
Add social links to header
{% endcomment %}