morning everyone,
i need to hide the cart icon on the right side of the header, and put it the “shop” voice in his place.
The “shop” should be bring the user to another site.
Thank you very much.
morning everyone,
i need to hide the cart icon on the right side of the header, and put it the “shop” voice in his place.
The “shop” should be bring the user to another site.
Thank you very much.
Hi @Ste_cor ,
What theme are you using? Please send me the theme name, and I will check it for you
http://hidden-garage-label.myshopify.com
I’m using Baseline theme 2.6.1., made by Switch themes.
Hi @Ste_cor ,
Please send me the code of header.liquid file, I will check it for you
{%- comment -%}
This is a required section for the Shopify Theme Store.
It is available in the "Header" section in the theme editor.
Theme Store required settings
- Show announcement
- Text: message to announce
- Link: link of the announcement bar
Theme Store optional settings
- Home page only: only shows on the home page
{%- endcomment -%}
{%- liquid
assign layout = section.settings.layout
assign section_color = 'header'
assign overlay_text_color = section.settings.overlay_text_color
assign show_icons = section.settings.show_icons
assign link_all = section.settings.show_all_navigation_links
if section.settings.overlay_homepage and template.name == 'index'
assign overlay_header = true
if section.settings.sticky_header
assign overlay_header_with_sticky = true
else
assign overlay_header_without_sticky = true
endif
endif
assign drop_down_cols_position = 'justify-center'
if section.settings.layout contains 'menu_left'
assign drop_down_cols_position = 'justify-start'
endif
-%}
{% comment %}
Logo
{% endcomment %}
{%- capture header_logo %}
{% if template.name == 'index' %}
#
{% else %}
{% endif %}
{% if section.settings.logo != blank %}
{%- assign logo = section.settings.logo -%}
{% capture image_size %}{{ section.settings.logo_max_width }}x{% endcapture %}
{%- unless overlay_header_without_sticky and section.settings.overlay_logo != blank -%}
{%- endunless -%}
{%- if overlay_header and section.settings.overlay_logo != blank -%}
{%- assign logo = section.settings.overlay_logo -%}
{%- endif -%}
{% else %}
{{ shop.name }}
{% endif %}
{% if template.name == 'index' %}
{% else %}
{% endif %}
{%- endcapture -%}
{% comment %}
Regular Nav
{% endcomment %}
{% comment %}theme-check-disable LiquidTag{% endcomment %}
{%- capture header_menu %}
{%- liquid
assign menu_style = layout | split: 'menu_' | last
assign counter = 0
if menu_style == 'center' or menu_style == 'below'
assign list_classes = 'justify-center -ml-4'
assign item_classes = 'ml-4'
elsif menu_style == 'left'
assign list_classes = 'justify-start'
assign item_classes = 'mr-4'
elsif menu_style == 'right'
assign list_classes = 'justify-end'
assign item_classes = 'ml-4'
endif
-%}
{%- unless layout contains 'spread' -%}
{%- endunless -%}
{%- for link in linklists[section.settings.menu].links -%}
{%- assign child_menu = '' -%}
{%- assign grandchild_menu = '' -%}
{%- if link.links != blank -%}
{%- if link_all -%}
{% capture link_dropdown %}
{{ link.title }}
{% endcapture %}
{%- endif -%}
{%- for child_link in link.links -%}
{%- if link.levels == 2 -%}
{% if child_link.links != blank %}
{%- capture grandchild_menu %}
{{- grandchild_menu -}}
##
{% if link_all %}{% endif %}
{{ child_link.title }}
{% if link_all %}{% endif %}
{%- for grandchild_link in child_link.links -%}
- {{ grandchild_link.title }}
{%- endfor -%}
{%- endcapture -%}
{%- else -%}
{%- capture child_menu %}
{{- child_menu -}}
- {{ child_link.title }}
{%- endcapture -%}
{%- endif -%}
{%- else -%}
{% comment %}Only second level template {% endcomment %}
{%- capture child_menu %}
{{- child_menu -}}
- {{ child_link.title }}
{%- endcapture -%}
{%- endif -%}
{%- endfor -%}
{%- unless layout contains 'spread' -%}
- {%- endunless -%}
{%- if child_menu != blank and grandchild_menu == blank -%}
{{ child_menu }}
{%- elsif child_menu != blank -%}
{{ link_dropdown }}
{{ child_menu }}
{{ grandchild_menu }}
{% else -%}
{{ link_dropdown }}
{{ grandchild_menu }}
{%- endif -%}
{%- unless layout contains 'spread' -%}
{%- endunless -%}
{% assign counter = counter | plus: 1 %}
{%- else -%}
{%- unless layout contains 'spread' -%}
- {%- endunless -%}
{{ link.title }}
{%- if link.active -%}
{%- endif -%}
{%- unless layout contains 'spread' -%}
{%- endunless -%}
{%- endif -%}
{%- endfor -%}
{% comment %}theme-check-enable LiquidTag{% endcomment %}
{%- endcapture -%}
{%- capture header_menu_toggle -%}
{%- endcapture -%}
{% comment %}
Accounts
{% endcomment %}
{% if shop.customer_accounts_enabled %}
{%- capture customer_accounts %}
{% if customer %}
{%- if show_icons -%}
{{ 'layout.customer.account' | t }}
{%- render 'icon-account' -%}
{%- else -%}
{{ 'layout.customer.account' | t }}
{%- endif -%}
{% else %}
{%- if show_icons -%}
{{ 'layout.customer.log_in' | t }}
{%- render 'icon-account' -%}
{%- else -%}
{{ 'layout.customer.log_in' | t }}
{%- endif -%}
{% endif %}
{%- endcapture -%}
{% endif %}
{% comment %}
Cart
{% endcomment %}
{%- capture header_cart %}
{%- if show_icons -%}
{%- render 'icon-cart' -%}
{%- else -%}
{{ 'layout.cart.title' | t }} ({{ cart.item_count }})
{%- endif -%}
{%- endcapture -%}
{{ 'general.accessibility.skip_to_content' | t }}
{% if settings.enable_breadcrumbs %}
{% render 'breadcrumbs', section_color: 'header' %}
{% endif %}
{% if section.settings.logo != blank %}
{% endif %}
{% if template.name == 'index' %}
{% assign potential_action_target = shop.url | append: routes.search_url | append: "?q={search_term_string}" %}
{% endif %}
{% schema %}
{
"name": "Header",
"class": "section-header relative z-20",
"settings": [
{
"type": "header",
"content": "Header"
},
{
"type": "image_picker",
"id": "logo",
"label": "Logo image"
},
{
"type": "range",
"id": "logo_max_width",
"min": 20,
"max": 450,
"step": 10,
"unit": "px",
"label": "Custom logo width",
"default": 250
},
{
"type": "link_list",
"id": "menu",
"label": "Menu",
"default": "main-menu",
"info": "This menu is only displayed on desktop. To change navigation for mobile/drawer menu, go to sidebar settings."
},
{
"type": "select",
"id": "layout",
"options": [
{ "value": "logo_left_menu_left", "label": "Logo left / menu left"},
{ "value": "logo_left_menu_right", "label": "Logo left / menu right"},
{ "value": "logo_left_menu_center", "label": "Logo left / menu center"},
{ "value": "logo_left_menu_spread", "label": "Logo left / menu spread"},
{ "value": "logo_left_menu_below", "label": "Logo left / menu below"},
{ "value": "logo_center_menu_left", "label": "Logo center / menu left"},
{ "value": "logo_center_menu_drawer", "label": "Logo center / menu drawer"}
],
"label": "Desktop layout"
},
{
"type": "select",
"id": "dropdown_text_align",
"options": [
{ "value": "left", "label": "Left"},
{ "value": "center", "label": "Center"},
{ "value": "right", "label": "Right"}
],
"label": "Dropdown text align"
},
{
"type": "checkbox",
"id": "show_all_navigation_links",
"label": "Enable links to drop-down link headings"
},
{
"type": "checkbox",
"id": "show_search",
"label": "Show search"
},
{
"type": "checkbox",
"id": "sticky_header",
"label": "Sticky header"
},
{
"type": "checkbox",
"id": "show_icons",
"label": "Show icons",
"info": "Show icons for menu, search and cart"
},
{
"type": "select",
"id": "color_scheme",
"label": "Color scheme",
"options": [
{ "value": "primary", "label": "Primary"},
{ "value": "secondary", "label": "Secondary"},
{ "value": "tertiary", "label": "Tertiary"}
],
"default": "primary"
},
{
"type": "header",
"content": "Overlay Settings"
},
{
"type": "checkbox",
"id": "overlay_homepage",
"label": "Overlay header over home page"
},
{
"type": "select",
"id": "overlay_text_color",
"label": "Overlay text color",
"options": [
{ "value": "primary", "label": "Primary text"},
{ "value": "secondary", "label": "Secondary text"},
{ "value": "tertiary", "label": "Tertiary text"},
{ "value": "white", "label": "White"},
{ "value": "black", "label": "Black"}
],
"default": "white"
},
{
"type": "image_picker",
"id": "overlay_logo",
"label": "Overlay logo image"
}
]
}
{% endschema %}
Thank you Namphan.
This is only for change the link? About hide the cart and profile icons?
Can you help me?
Thank you in advance
Thank you very much Namphan, it works!
Another issue, How can i delete the login button?
It’s nearby the shop name however!
Thank you Namphan for this helpful solution!
Only one issue to solve; how can i link the “Password page” once i clicked on the “Shop” voice?