Jump to content
Search Community

Adding SVG with 'path' element & drawSVG to WordPress

benjino test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I have this pen working and have added the code to WordPress. The SVG is appearing but not drawing. Sorry, I don't have a live example worked up yet.

  1. I've added all the code where it needs to go. There is an existing GSAP animation so I plugged in the JS in the same file, the CSS in the stylesheet, and the drawSVG plugin link where the Tweenmax link is.
  2. I've also added the CSSPlugin link, and am not sure if that is needed. I'm using the <path> element only.
  3. The SVG image code is placed in a WordPress text widget running the newest version of WP. Funny that the image will show on the front-end but when I navigate back to the text widget the SVG code does not remain in the text widget.
  4. When I inspect for the SVG, it's code is in the html, yet there is not JS error in the console.

What could I be missing?

Are there any known issues with WordPress and drawSVG?

 

 

 

See the Pen vJByKz by benjino (@benjino) on CodePen

Edited by benjino
disregard
Link to comment
Share on other sites

  • 3 years later...

Hi Alextazie,

 

I would suggest you start a new post detailing your specific problem, it's unlikely you're going to get a solution based off a three year old post and no information about your issues, and if possible make a minimal demo on codepen so we can see what your animation actually is and rule out gsap issues. I would also suggest searching forum posts on wordpress there are a number of other posts that discuss properly adding gsap to wordpress.

 

 

 

 

 

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...