I want to add some icons like Apple, Samsung and Any Brands icon. I want someone help me in coding how to do it with (fontawesome icons or any website that make it done).
ICON ![]()
SVG File
.
Navigation - Submenu
I need to code the theme, Sub menu and add font icons not svg img. Please any advice any help.
Hi @Mujammami ,
Please follow the steps below:
Code:
Ex code for apple:
- apple
Also, you can use any font awesome free icons.
Hope it helps!
Hi @Mujammami ,
Can you send me the code where you add the svg icon? You just edit it to font awesome, it will display fine.
If you can’t find it, please send me the code of /sidebar.liquid file, I will check it.
If it helped you solve your issue, please mark it as a solution. Thank you and good luck.
This is the full code for (Sidebar.liquid)
{{ ‘layout.navigation.menu’ | t }}
{% for link in menus[section.settings.main_menu_link_list].links %}
{% assign outer_index = forloop.index %}
{% if link.links != blank %}
{% assign has_active_link = false %}
{% if link.active or link.child_active %}
{% assign has_active_link = true %}
{% endif %}
{{ link.title | escape }}
{% if has_active_link %}-{% else %}+{% endif %}
{% for childlink in link.links %}
{% if childlink.links != blank %}
{% assign has_active_childlink = false %}
{% if childlink.active or childlink.child_active %}
{% assign has_active_childlink = true %}
{% endif %}
{{ childlink.title | escape }}
{% if has_active_childlink %}-{% else %}+{% endif %}
{% for grandchildlink in childlink.links %}
apple
<a href=“{{ grandchildlink.url }}” class=“site-nav__link”{% if grandchildlink.active %} aria-current=“page”{% endif %}>{{ grandchildlink.title | escape }}
{% endfor %}
{% else %}
<a href=“{{ childlink.url }}” class=“site-nav__link”{% if childlink.active %} aria-current=“page”{% endif %}>{{ childlink.title | escape }}
{% endif %}
{% endfor %}
{% else %}
<a href=“{{ link.url }}” class=“site-nav__link”{% if link.active %} aria-current=“page”{% endif %}>{{ link.title | escape }}
{% endif %}
{% endfor %}
{% if shop.customer_accounts_enabled %}
{% if customer %}
{% else %}
{% endif %}
{% endif %}
apple
{% if settings.social_facebook_link != blank %}
{% include ‘icon-facebook’ %}
{% endif %}
{% if settings.social_twitter_link != blank %}
{% include ‘icon-twitter’ %}
{% endif %}
{% if settings.social_pinterest_link != blank %}
{% include ‘icon-pinterest’ %}
{% endif %}
{% if settings.social_instagram_link != blank %}
{% include ‘icon-instagram’ %}
{% endif %}
{% if settings.social_snapchat_link != blank %}
{% include ‘icon-snapchat’ %}
Snapchat
{% endif %}
{% if settings.social_google_plus_link != blank %}
{% include ‘icon-google-plus’ %}
Google Plus
{% endif %}
{% if settings.social_tumblr_link != blank %}
{% include ‘icon-tumblr’ %}
Tumblr
{% endif %}
{% if settings.social_youtube_link != blank %}
{% include ‘icon-youtube’ %}
YouTube
{% endif %}
{% if settings.social_vimeo_link != blank %}
{% include ‘icon-vimeo’ %}
Vimeo
{% endif %}
{% if settings.social_fancy_link != blank %}
{% include ‘icon-fancy’ %}
Fancy
{% endif %}
{% if settings.main_blog != blank %}
{% include ‘icon-rss’ %}
Blog
{% endif %}
{% schema %}
{
“name”: {
“cs”: “Postranní lišta”,
“da”: “Sidebjælke”,
“de”: “Seitenleiste”,
“en”: “Sidebar”,
“es”: “Barra lateral”,
“fi”: “Sivupalkki”,
“fr”: “Barre latérale”,
“it”: “Sidebar”,
“ja”: “サイドバー”,
“ko”: “사이드바”,
“nb”: “Sidefelt”,
“nl”: “Zijbalk”,
“pl”: “Pasek boczny”,
“pt-BR”: “Barra Lateral”,
“pt-PT”: “Barra lateral”,
“sv”: “Sidofält”,
“th”: “แถบด้านข้าง”,
“tr”: “Kenar çubuğu”,
“vi”: “Thanh bên”,
“zh-CN”: “侧边栏”,
“zh-TW”: “側邊欄”
},
“settings”: [
{
“type”: “link_list”,
“id”: “main_menu_link_list”,
“label”: {
“cs”: “Nabídka”,
“da”: “Menu”,
“de”: “Menü”,
“en”: “Menu”,
“es”: “Menú”,
“fi”: “Valikko”,
“fr”: “Menu”,
“it”: “Menu”,
“ja”: “メニュー”,
“ko”: “메뉴”,
“nb”: “Meny”,
“nl”: “Menu”,
“pl”: “Menu”,
“pt-BR”: “Menu”,
“pt-PT”: “Menu”,
“sv”: “Meny”,
“th”: “เมนู”,
“tr”: “Menü”,
“vi”: “Menu”,
“zh-CN”: “菜单”,
“zh-TW”: “選單”
},
“default”: “main-menu”
}
]
}
{% endschema %}
{{ ‘layout.navigation.menu’ | t }}
{% for link in menus[section.settings.main_menu_link_list].links %}
{% assign outer_index = forloop.index %}
{% if link.links != blank %}
{% assign has_active_link = false %}
{% if link.active or link.child_active %}
{% assign has_active_link = true %}
{% endif %}
{{ link.title | escape }}
{% if has_active_link %}-{% else %}+{% endif %}
{% for childlink in link.links %}
{% if childlink.links != blank %}
{% assign has_active_childlink = false %}
{% if childlink.active or childlink.child_active %}
{% assign has_active_childlink = true %}
{% endif %}
{{ childlink.title | escape }}
{% if has_active_childlink %}-{% else %}+{% endif %}
{% for grandchildlink in childlink.links %}
apple
<a href=“{{ grandchildlink.url }}” class=“site-nav__link”{% if grandchildlink.active %} aria-current=“page”{% endif %}>{{ grandchildlink.title | escape }}
{% endfor %}
{% else %}
<a href=“{{ childlink.url }}” class=“site-nav__link”{% if childlink.active %} aria-current=“page”{% endif %}>{{ childlink.title | escape }}
{% endif %}
{% endfor %}
{% else %}
<a href=“{{ link.url }}” class=“site-nav__link”{% if link.active %} aria-current=“page”{% endif %}>{{ link.title | escape }}
{% endif %}
{% endfor %}
{% if shop.customer_accounts_enabled %}
{% if customer %}
{% else %}
{% endif %}
{% endif %}
apple
{% if settings.social_facebook_link != blank %}
{% include ‘icon-facebook’ %}
{% endif %}
{% if settings.social_twitter_link != blank %}
{% include ‘icon-twitter’ %}
{% endif %}
{% if settings.social_pinterest_link != blank %}
{% include ‘icon-pinterest’ %}
{% endif %}
{% if settings.social_instagram_link != blank %}
{% include ‘icon-instagram’ %}
{% endif %}
{% if settings.social_snapchat_link != blank %}
{% include ‘icon-snapchat’ %}
Snapchat
{% endif %}
{% if settings.social_google_plus_link != blank %}
{% include ‘icon-google-plus’ %}
Google Plus
{% endif %}
{% if settings.social_tumblr_link != blank %}
{% include ‘icon-tumblr’ %}
Tumblr
{% endif %}
{% if settings.social_youtube_link != blank %}
{% include ‘icon-youtube’ %}
YouTube
{% endif %}
{% if settings.social_vimeo_link != blank %}
{% include ‘icon-vimeo’ %}
Vimeo
{% endif %}
{% if settings.social_fancy_link != blank %}
{% include ‘icon-fancy’ %}
Fancy
{% endif %}
{% if settings.main_blog != blank %}
{% include ‘icon-rss’ %}
Blog
{% endif %}
{% schema %}
{
“name”: {
“cs”: “Postranní lišta”,
“da”: “Sidebjælke”,
“de”: “Seitenleiste”,
“en”: “Sidebar”,
“es”: “Barra lateral”,
“fi”: “Sivupalkki”,
“fr”: “Barre latérale”,
“it”: “Sidebar”,
“ja”: “サイドバー”,
“ko”: “사이드바”,
“nb”: “Sidefelt”,
“nl”: “Zijbalk”,
“pl”: “Pasek boczny”,
“pt-BR”: “Barra Lateral”,
“pt-PT”: “Barra lateral”,
“sv”: “Sidofält”,
“th”: “แถบด้านข้าง”,
“tr”: “Kenar çubuğu”,
“vi”: “Thanh bên”,
“zh-CN”: “侧边栏”,
“zh-TW”: “側邊欄”
},
“settings”: [
{
“type”: “link_list”,
“id”: “main_menu_link_list”,
“label”: {
“cs”: “Nabídka”,
“da”: “Menu”,
“de”: “Menü”,
“en”: “Menu”,
“es”: “Menú”,
“fi”: “Valikko”,
“fr”: “Menu”,
“it”: “Menu”,
“ja”: “メニュー”,
“ko”: “메뉴”,
“nb”: “Meny”,
“nl”: “Menu”,
“pl”: “Menu”,
“pt-BR”: “Menu”,
“pt-PT”: “Menu”,
“sv”: “Meny”,
“th”: “เมนู”,
“tr”: “Menü”,
“vi”: “Menu”,
“zh-CN”: “菜单”,
“zh-TW”: “選單”
},
“default”: “main-menu”
}
]
}
{% endschema %}
I send it privetly.
Hi @Mujammami ,
You are adding it like this:
You just need to add the following code, it will display separately:
Code:
{% if childlink.title == 'متجر الأجهزة الذكية' %}
{% endif %}
Hope it helps!