Site logo

Archived topic

Adding Icon into header

14 replies · Started by Ash on August 12, 2021

Viewing posts 1–15 of 15

Hi

I would like to add user icon left of my cart widget in the header.

Cart is a custom widget shortcode added via generate_after_header_content hook

What the best way to do this?

Thanks

Hi there,

you could simply add the HTML with your icon and link before the shortcode in your current hook.

Yh I tried but it looked crap.

I want to use the svg icon like the user one in GB. Needs to have a class so I can add css and a URL

Can you link us to the page in question?

Hi

Leo added the link

Can you add the icon in?

All I did was copy the svg code and it was huge not something I can leave on a live site

Then please start a staging site so it's easier for us to help.

What you can't give me a template/instructions of inserting a svg icon with a link.

I have added a temp fa icon for now. I'll sort it out my self next week.

David did provide the instruction but looks like it wasn't working perfectly for you.

I'm guessing that it just needs a bit CSS but we cannot provide the code without seeing the issue.

Glad you found a workaround solution.

No solution was given. I don't want to use FA icons as the plugin that loads it will be replaced soon. I wanted to use SVG

<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" class="svg-inline--fa fa-user-circle fa-w-16" data-icon="user-circle" data-prefix="fas" viewBox="0 0 496 512"><defs/><path fill="#414042" d="M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 96c48.6 0 88 39.4 88 88s-39.4 88-88 88-88-39.4-88-88 39.4-88 88-88zm0 344c-58.7 0-111.3-26.6-146.5-68.2 18.8-35.4 55.6-59.8 98.5-59.8 2.4 0 4.8.4 7.1 1.1 13 4.2 26.6 6.9 40.9 6.9 14.3 0 28-2.7 40.9-6.9 2.3-.7 4.7-1.1 7.1-1.1 42.9 0 79.7 24.4 98.5 59.8C359.3 421.4 306.7 448 248 448z"/></svg>

But no idea how to add a link or how to resize it

WOW. Why don't you just say you don't know. And don't patronize me that this isn't a theme related question. I could provide links for hundreds of topics in this forum that are certainly not theme related but kind people have helped them. I also use GB pro that supports SVG icons. I asked a similar question last year when I had an old header layout, Tom and David were extremely helpful and that included icons.

So if this isn't "theme related" maybe it could be added via GB, I'll email Tom.

Topic Resolved!

If you can start a staging site and link me to the page in question then I can certainly help.

It's difficult to identify the issue you are running into without seeing it. That's all I'm asking.

This archived topic is closed to new replies.