Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #645372

    Hello,

    I want to put this in my site section: http://codepen.io/malaure/pen/mEVVZX

    1 / I noted in ID: particles-js

    2 / In the custom.css I added the code in CSS.

    3 / In functions.php I added the code in JS.

    function add_custom_script(){
    ?>
    <script>
    (function($){particlesJS("particles-js", {"particles":{"number":{"value":47,"density":{"enable":true,"value_area":552.4033491425909}},"color":{"value":"#ffffff"},"shape":{"type":"circle","stroke":{"width":0,"color":"#000000"},"polygon":{"nb_sides":5},"image":{"src":"img/github.svg","width":100,"height":100}},"opacity":{"value":0.5,"random":false,"anim":{"enable":false,"speed":1,"opacity_min":0.1,"sync":false}},"size":{"value":3,"random":true,"anim":{"enable":false,"speed":40,"size_min":0.1,"sync":false}},"line_linked":{"enable":true,"distance":150,"color":"#ffffff","opacity":0.4,"width":1},"move":{"enable":true,"speed":6,"direction":"none","random":false,"straight":false,"out_mode":"out","bounce":false,"attract":{"enable":false,"rotateX":600,"rotateY":1200}}},"interactivity":{"detect_on":"canvas","events":{"onhover":{"enable":true,"mode":"grab"},"onclick":{"enable":true,"mode":"push"},"resize":true},"modes":{"grab":{"distance":155.84415584415586,"line_linked":{"opacity":1}},"bubble":{"distance":400,"size":40,"duration":2,"opacity":8,"speed":3},"repulse":{"distance":200,"duration":0.4},"push":{"particles_nb":4},"remove":{"particles_nb":2}}},"retina_detect":true});var count_particles, stats, update; stats = new Stats; stats.setMode(0); stats.domElement.style.position = 'absolute'; stats.domElement.style.left = '0px'; stats.domElement.style.top = '0px'; document.body.appendChild(stats.domElement); count_particles = document.querySelector('.js-count-particles'); update = function() { stats.begin(); stats.end(); if (window.pJSDom[0].pJS.particles && window.pJSDom[0].pJS.particles.array) { count_particles.innerText = window.pJSDom[0].pJS.particles.array.length; } requestAnimationFrame(update); }; requestAnimationFrame(update);;
    })(jQuery);
    </script>
    <?php
    }
    add_action('wp_footer', 'add_custom_script')

    But it does not work ((((

    Would you have a solution?

    Thank you very much !
    Laure

    EDIT : I forgot to say that I see the gray background on all of my page but not the particles (((

    • This topic was modified 8 years, 6 months ago by Laure.
    #646097

    Hey Laure,

    Our support for third party code or plugins is limited but send us an admin login in private and we’ll have a look at it.

    Best regards,
    Rikard

    #664275

    Did you come up with a solution?

    #664957

    Hi,

    @M|C i guess not. If you are having the issue, please start a new thread, create a testing page and post temporary admin logins in private content field so we can look into it.
    As Rikard mentioned, we normally do not support third party plugins but we do not mind taking a quick look :)

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.