Good for acting on specific pieces of your SVG object instead of just link as an <img>
you can bring the entire object into your HTML. You need two things:
.php
- e.g. logo.svg.php
get_template_part
<?php
get_template_part( 'includes/partials/logo', 'logo.svg' );
?>
That’ll strip off the .php
extension and bring in the entire SVG object. Your SVG can be straight up exported from Illustrator or what have you, nothing special in there. But remember you’ll need to give it an ID so you can access it via CSS.