0

WP beginner here. I'm trying to upload an svg logo to my site. The logo can be accessed here. If you open it in the browser and inspect it, it should show the svg tags around the object.

I've installed the SVG Support plugin and uploaded the image and set it as the logo of my theme. The logo is displayed in img tags but not as an svg. How would I change its color?

What am I doing wrong?

3
  • If it’s in an img tag, you can’t. Dec 28, 2021 at 12:01
  • Welcome to wpse! If you want it either black or white you can use css filter: brightness(0) invert(1); (that will make it white for example). If you want it in any other color, as jacob said, you can't Dec 28, 2021 at 12:11
  • one option, you could use css and make the svg a background mask and change the color of it that way. .my-logo{ background: #000000; mask: url('path/to/svg') center no-repeat; } this will require custom CSS in the customizer, but should be doable without editing any theme template files
    – NickFMC
    Dec 28, 2021 at 17:56

1 Answer 1

1

You could paste the SVG in the Custom HTML block and style it with CSS.

There is also https://wordpress.org/plugins/icon-block/ which supports pasting a custom icon and facilitates styling it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.