Hello,
How to make this menu with image on mobile menu?
This will require some code. Are you capable of coding ?
yes, but maybe you have the code off this?
To add images to your mobile menu in Shopify, follow these steps:
{% if settings.mobile_menu == true %}
<ul class="mobile-menu-list">
{% for link in linklists.main-menu.links %}
<li class="menu-item">
<a href="{{ link.url }}" class="menu-link">
{% if link.metafields.menu_link_image %}
<img src="{{ link.metafields.menu_link_image }}" alt="{{ link.title }}" class="menu-item-image" />
{% endif %}
<span class="menu-item-text">{{ link.title }}</span>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
Add this CSS to Assets > theme.scss.liquid:
/* Mobile Menu Styling */
.mobile-menu-list {
list-style: none;
padding: 0;
}
.menu-item {
display: flex;
align-items: center;
}
.menu-item-image {
max-width: 30px;
margin-right: 10px;
}
.menu-item-text {
font-size: 16px;
}
This code will add images to the mobile navigation items. You can modify the image URLs and styles as needed.
OKey, thank you, but last question. if i have in menu like 6 pages like in my example.If I use 5 pages in menu, how do I assign separate pictures to each one? i understand that your code is for one menu item? ar not?
Good morning
Thank you for your valuable information.
Could you make me a video tutorial to illustrate all of this?
Thank you very much in advance.