Will McLean is a designer and artist working in the Central Coast of NSW where he lives with his wife and 2 children.

Will is a meticulous developer and favours simplicity and clarity within his code. He can’t stand writing things twice so searches for any way to automate. His experiments can be found in the Exercises section of this site.

Will designs within systems. No project is too small for a design system. He favours the unusual, if not, how can he progress? You can read about his work in the Case Studies section of this site.

Updated: October 31, 2017

This is a Knowledge Base post.

Adding inline SVGs in WordPress

Finding the best way to include SVG files in WordPress can be a little confusing. There doesn’t seem to be a clear answer anywhere. This article recommends using get_template_part() but for our particular host and the way we deploy this would cause parsing issues with the opening line of the SVG files. It is an xml tag and our host thinks it is a shorthand php tag and won’t allow it. The method below is based around the Using SVG article by Chris Coyier.

echo file_get_contents( get_template_directory() . '/images/icon.svg' );