How can I place a car icon on the top bar?

I wanted to put a car icon in the top bar. example:

未命名1686365806.png

website:https://greatspeedsports.myshopify.com/ password:2023

1 Like

@Bethchan56 , Please copy-paste below text in your customization theme.

Free U.S. shipping

:delivery_truck: Free U.S. shipping

let me know if you have any doubt.

1 Like

@Bethchan56

yes, please confirm used be code

Free U.S. shipping

Hello,

Thanks for your help. I have pasted it but there’s no car icon. And I want to use my icon. How to do that?

Could you share your Icon with me? @Bethchan56

Does your icon in SVG format? if you want to upload a custom one then might be some minor changes are needed in your theme code.

Yes, Svg:

icon link:https://www.iconpacks.net/free-icon/delivery-truck-9159.html

@Bethchan56

yes, please share your annulment bar code so i will check and update

Hello,

I don’t know whether the code is the top bar code.

1 Like

@Bethchan56

yes please share your top bar code

@Bethchan56 , you can add an additional option to your customize screen for the SVG icon. You can use the schema type HTML and add svg code within that. and call it within your announcement bar. here is the scheme code.

{
  "type": "html",
  "id": "svg_icn",
  "label": "Add your SVG code here"
}

and You can use below code where you want to fetch that icon.

{{section.settings.svg_icn}}

I hope this will help you!

Hello,

Thanks for your reply. I have added the code at custom-html.liquid.

where should I paste the code ? Is the code correct?

{{.t4s-top-bar.settings.svg_freeshipping_icn}}

oh, you did it wrong. Just open your announcement bar liquid file and in the schema where find the announcement bar text and just below on option add the option of HTML which I suggested in the previous post.

and you don’t have to paste your SVG code on the label. It’ll appear when you open customize screen. paste the SVG code there in the customize screen.

and once you add the schema code then use below code to fetch that schema for to display at frontend side.

{{section.settings.svg_icn}}

hope you got an idea of what I want to convey.

Hello,

Thanks for your explanation but I still don’t understand.

Is it right where the code I add to?

Where is the customize screen?

Where the code should I add to? {{section.settings.svg_icn}}

@Bethchan56 , If you don’t mind should I help you with theme code?