Add SVG image file to WordPress theme

Here’s how to add an .svg file to your a template in your WordPress theme – without having to paste the entire file contents:

https://gist.github.com/spigotdesign/4e493d5678daeaa8d266

I use this technique to add the main logo to a website. It would normally go in header.php but would work anywhere.

Related posts

4 comments

  • Perfect thank you !

    Is this solution enough secured against XSS attack and other security problems inherent to SVG files and XML ?

  • Manan Vyas

    Thanks. It works like a charm. :) cheers.

Leave your comment