Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
That one no, but look at the red teeth, them are SVG!
I think it’s a problem of the editor of wordpress, because if i try to copy the code from the page into my wordpress’ page with FIREBUG it works.
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Oh I see, sorry.
Could you copy all of your HTML (from the page’s source code) and paste it into a sandbox and share us a link to that?
here you can find the jsFiddle with the working code:
jsFiddle
I copied and paste that code into my wordpress’ page and the svg doesn’t work.
Here you can find how it appear in firebug my wordpress’ page
IMAGE
Like you can see there isn’t any </svg> at the end and the syntax of the path it’s incorrect!
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
If it involves jQuery then you need to use a noconflict wrapper and you may need to enqueue your script.
Btw it doesn’t look like the teeth are coloured on your JSfiddle page
It’s no a problem of jQuery because I’ve already solved that in wordpress π
I tried to change the color directly in svg file ( “fill:red” ) but nothing works. Truts me it’s a problem of the “pasting” code in wordpress editor, let me explain you why:
1. I opened the external page ( PAGE ) and I analized it with firebug.
2. I copied the code ( from firebug )
3. I opened my wordpress page and analized it with firebug
4. I pasted the part in my wordpress page, with FIREBUG and it works.
Another example is this:
I copied the code from HERE, pasted in my wordpress page and neither this was appeared!
Andrew Nevins
(@anevins)
WCLDN 2018 Contributor | Volunteer support
Could you post here the HTML output of your SVG code that is on your webpage?
HERE you can find the code that i copied. Like you can see there is a problem because there isn’t any </svg> and WordPress generate <p> and interpretates every <path> inside another <path>.
i’m so sorry but i’m working in local so i can’t show you the code now π
ps: I copied the code from Firebug
I had the same problem, noticed WP was inserting
most likely due to the copy and paste. I compressed the svg code w/ no unnecessary spaces and presto. In working order.
Hope this helps.