How to add icon on navigation bar

Highlighted
Tourist
25 1 3

Hello,

I want to replace in my navigation menu: the word ‘home’ into a icon of a house. 

I use the venture theme, how do I need to do this?  

0 Likes
Highlighted
Shopify Partner
160 17 15

Hi @Demson2020 ,

You can achieve this by uploading the home icon to your Shopify store (Settings >files > upload) and then adding the following code to your theme.js.liquid (Not theme.scss.liquid)

 

 

 

$(document).ready(function () {
$('#SiteNav li:first-child a').html('<img href="YOUR HOME ICON URL" alt="home" style="width: 20px">');
});

 

 

Replace the line "YOUR HOME ICONE URL" to the link you copied after uploading the icon to Shopify.

Let me know if you need help with anything else.

Thanks

Umair Abbas

 

Want to get customization to your store or bug fixing quickly? Hire Me for an hour for only $20 (Or get a fixed quote)
Hire Me For
  • Store Setup
  • HTML, CSS, JS, JQuery and Liquid coding
  • Bug Fixing

Email at umairabbascs@gmail.com or WhatsApp

0 Likes
Highlighted
Tourist
25 1 3

Hello @UmairAbbas,

Thank you for the reply. Where do I need to add the code?                                                                                                                                                                                                           Because, if I add the code in the bottom I get on my page a square in the place of the text 'home'.



 
 
 
 
 
 
0 Likes