We currently use the Galleria theme, and want to change the header so that the logo is on the left, the menu is centered and the search bar icon and cart icon are on the right (in desktop view)
Hi @SimoneHooper ,
Are you wanting this?
please send me the code of header.liquid file, I will check it for you
Hello @SimoneHooper ,
Unfortunately, this is not editable with just CSS code. Your header needs customize.
You should hire someone who knows coding or an expert in Shopify programming, they can help you with this.
In addition, you can contact the theme provider you are using, maybe they can help you fix it.
Kind & Best regards,
GemPages Support Team
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community! ![]()
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
Hello @KetanKumar , thank you for getting back to me.
This is our URL: https://www.dynastysport.co.nz/
However we are currently moving over to a new theme, which is the one we want the header edited on. This is the preview link (using Galleria) https://g32ws0zy67kojite-8128266299.shopifypreview.com
Thank you so much for your help!
Hello,
Thank you for getting back to me. This is the header.liquid code:
{{ ‘component-list-menu.css’ | asset_url | stylesheet_tag }}
{{ ‘component-search.css’ | asset_url | stylesheet_tag }}
{{ ‘component-menu-drawer.css’ | asset_url | stylesheet_tag }}
{{ ‘component-cart-notification.css’ | asset_url | stylesheet_tag }}
{% render 'icon-hamburger' %} {% render 'icon-close' %}
-
{%- for link in section.settings.menu.links -%}
-
{%- if link.links != blank -%}
{%- else -%} {{ link.title | escape }} {%- endif -%}
{{ link.title | escape }} {% render 'icon-arrow' %} {% render 'icon-caret' %}
{% render 'icon-arrow' %} {{ link.title | escape }}-
{%- for childlink in link.links -%}
-
{%- if childlink.links == blank -%}
{{ childlink.title | escape }}
{%- else -%}
{%- endif -%}
{{ childlink.title | escape }} {% render 'icon-arrow' %} {% render 'icon-caret' %}
{% render 'icon-arrow' %} {{ childlink.title | escape }}-
{%- for grandchildlink in childlink.links -%}
- {{ grandchildlink.title | escape }} {%- endfor -%}
{%- endfor -%}
{%- endfor -%}
-
{%- if childlink.links == blank -%}
{{ childlink.title | escape }}
{%- else -%}
-
{%- if settings.social_twitter_link != blank -%}
- {%- render 'icon-twitter' -%} {{ 'general.social.links.twitter' | t }} {%- endif -%} {%- if settings.social_facebook_link != blank -%}
- {%- render 'icon-facebook' -%} {{ 'general.social.links.facebook' | t }} {%- endif -%} {%- if settings.social_pinterest_link != blank -%}
- {%- render 'icon-pinterest' -%} {{ 'general.social.links.pinterest' | t }} {%- endif -%} {%- if settings.social_instagram_link != blank -%}
- {%- render 'icon-instagram' -%} {{ 'general.social.links.instagram' | t }} {%- endif -%} {%- if settings.social_tumblr_link != blank -%}
- {%- render 'icon-tumblr' -%} {{ 'general.social.links.tumblr' | t }} {%- endif -%} {%- if settings.social_snapchat_link != blank -%}
- {%- render 'icon-snapchat' -%} {{ 'general.social.links.snapchat' | t }} {%- endif -%} {%- if settings.social_youtube_link != blank -%}
- {%- render 'icon-youtube' -%} {{ 'general.social.links.youtube' | t }} {%- endif -%} {%- if settings.social_vimeo_link != blank -%}
- {%- render 'icon-vimeo' -%} {{ 'general.social.links.vimeo' | t }} {%- endif -%}
{%- if section.settings.logo_position == ‘top-center’ or section.settings.menu == blank -%}
{%- if request.page_type == ‘index’ -%}
{%- endif -%}
{%- if section.settings.logo != blank -%}
{%- assign image_size = section.settings.logo_width | append: 'x' -%}
{%- else -%}
{{ shop.name }}
{%- endif -%}
{%- if request.page_type == 'index' -%}
{%- endif -%}
{%- if section.settings.menu != blank -%}
-
{%- for link in section.settings.menu.links -%}
-
{%- if link.links != blank -%}
{%- else -%} {{ link.title | escape }} {%- endif -%}
{{ link.title | escape }} {% render 'icon-caret' %}
-
{%- for childlink in link.links -%}
-
{%- if childlink.links == blank -%}
{{ childlink.title | escape }}
{%- else -%}
{%- endif -%}
{{ childlink.title | escape }} {% render 'icon-caret' %}
-
{%- for grandchildlink in childlink.links -%}
- {{ grandchildlink.title | escape }} {%- endfor -%}
{%- endfor -%}
{%- endfor -%}
-
{%- if childlink.links == blank -%}
{{ childlink.title | escape }}
{%- else -%}
{%- if shop.customer_accounts_enabled -%}
{% render ‘icon-account’ %}
{%- liquid
if customer
echo ‘customer.account_fallback’ | t
else
echo ‘customer.log_in’ | t
endif
-%}
{%- endif -%}
{%- if request.page_type != ‘cart’ -%}
{%- render ‘cart-notification’ -%}
{%- endif -%}
{% javascript %}
class StickyHeader extends HTMLElement {
constructor() {
super();
}
connectedCallback() {
this.header = document.getElementById(‘shopify-section-header’);
this.headerBounds = {};
this.currentScrollTop = 0;
this.onScrollHandler = this.onScroll.bind(this);
window.addEventListener(‘scroll’, this.onScrollHandler, false);
this.createObserver();
}
disconnectedCallback() {
window.removeEventListener(‘scroll’, this.onScrollHandler);
}
createObserver() {
let observer = new IntersectionObserver((entries, observer) => {
this.headerBounds = entries[0].intersectionRect;
observer.disconnect();
});
observer.observe(this.header);
}
onScroll() {
const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
if (scrollTop > this.currentScrollTop && scrollTop > this.headerBounds.bottom) {
requestAnimationFrame(this.hide.bind(this));
} else if (scrollTop < this.currentScrollTop && scrollTop > this.headerBounds.bottom) {
requestAnimationFrame(this.reveal.bind(this));
} else if (scrollTop <= this.headerBounds.top) {
requestAnimationFrame(this.reset.bind(this));
}
this.currentScrollTop = scrollTop;
}
hide() {
this.header.classList.add(‘shopify-section-header-hidden’, ‘shopify-section-header-sticky’);
this.closeMenuDisclosure();
this.closeSearchModal();
}
reveal() {
this.header.classList.add(‘shopify-section-header-sticky’, ‘animate’);
this.header.classList.remove(‘shopify-section-header-hidden’);
}
reset() {
this.header.classList.remove(‘shopify-section-header-hidden’, ‘shopify-section-header-sticky’, ‘animate’);
}
closeMenuDisclosure() {
this.disclosures = this.disclosures || this.header.querySelectorAll(‘details-disclosure’);
this.disclosures.forEach(disclosure => disclosure.close());
}
closeSearchModal() {
this.searchModal = this.searchModal || this.header.querySelector(‘details-modal’);
this.searchModal.close(false);
}
}
customElements.define(‘sticky-header’, StickyHeader);
{% endjavascript %}
{%- if request.page_type == ‘index’ -%}
{% assign potential_action_target = shop.url | append: routes.search_url | append: “?q={search_term_string}” %}
{%- endif -%}
{% schema %}
{
“name”: “t:sections.header.name”,
“settings”: [
{
“type”: “image_picker”,
“id”: “logo”,
“label”: “Logo”
},
{
“type”: “range”,
“id”: “logo_width”,
“min”: 50,
“max”: 250,
“step”: 10,
“default”: 100,
“unit”: “t:sections.header.settings.logo_width.unit”,
“label”: “Logo width”
},
{
“type”: “select”,
“id”: “logo_position”,
“options”: [
{
“value”: “middle-left”,
“label”: “t:sections.header.settings.logo_position.options__1.label”
},
{
“value”: “top-left”,
“label”: “t:sections.header.settings.logo_position.options__2.label”
},
{
“value”: “top-center”,
“label”: “t:sections.header.settings.logo_position.options__3.label”
}
],
“default”: “middle-left”,
“label”: “t:sections.header.settings.logo_position.label”
},
{
“type”: “link_list”,
“id”: “menu”,
“default”: “main-menu”,
“label”: “t:sections.header.settings.menu.label”
},
{
“type”: “checkbox”,
“id”: “show_line_separator”,
“default”: true,
“label”: “t:sections.header.settings.show_line_separator.label”
},
{
“type”: “checkbox”,
“id”: “enable_sticky_header”,
“default”: true,
“label”: “t:sections.header.settings.enable_sticky_header.label”
}
]
}
{% endschema %}
