skip to Main Content

Im having troubles with adding JS particles.js “adding Particles.js” into DIVI them which can be found here
(particleJs)Even i add HTML,CSS,JS the result cant be seen, thank you for reply.

2

Answers


  1. I would enqueuer the scripts in functions.php, also before updating this I would create a child theme and add a functions.php file to your child theme and make the changes there to ensure you don’t loose the change come updating the theme

    Creating a child theme -> https://codex.wordpress.org/Child_Themes
    Encuing scripts -> https://developer.wordpress.org/reference/functions/wp_enqueue_script/

    Login or Signup to reply.
  2. I know this is a bit late but for the sake of future generations – there is an easy way using the following WP-Plugin ParticleJs-WP-Plugin that is available form Github only. This plugin allows you to use the Particle.js JSON via copy&paste.
    The first argument of the function is your ID-name that you can use in the divi builder CSS-section.

    particlesJS('your-particle-css-id',{});
    

    Of course you can as well make a child theme and enque the scripts in functions.php but the plugin does it all for you and is very lightweight.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search