0
<svg height="80" width="300">
<g fill="none" stroke="black" 
stroke-width="6">
<path stroke-linecap="butt" d="M5 20 
 l215 0" />
<path stroke-linecap="round" d="M5 
40 l215 0" />
<path stroke-linecap="square" d="M5 
60 l215 0" />
</g>
</svg>

Ok so I wrote this code in my WordPress post and nothing showed up. But there's no problem when I run it in a simple HTML file format . Can anyone tell why this thing is not working in WordPress...

  • TinyMCE strips SVG code. It can't be added through the Text editor. – Ty Bailey May 09 '18 at 17:53
  • Then how should I add this type in my WordPress post ? – himanshu chandan May 09 '18 at 18:01
  • Follow this article: https://css-tricks.com/snippets/wordpress/allow-svg-through-wordpress-media-uploader/ to add the SVG mime-type to WP and then you can save your svg code as a .svg file and upload/insert it like a regular image. – Ty Bailey May 09 '18 at 18:02

0 Answers0