Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: Configuring particles.js with custom wordpress theme


I am currently working on a portfolio site and am trying to integrate a really handy feature called particles.js. It works fine and is extremely easy to integrate in a static HTML page but the issue is I am developing a Custom Wordpress Theme and keep getting errors. I am using the designated CDN to bring in the script for particles.js and I have the json and app file saved locally in my files. I am using enqueue for both of the js files that are necessary for this library to work. I will link to code for the two local files and I will also link the CDN as well!

The link to the two files is here:

The link for the CDN is here:

and the enqueue code goes as follows:

function wpb_adding_scripts() {
'[email protected]/particles.min.js');
wp_register_script('app', get_template_directory_uri() . '/js/app.js');

add_action ('wp_enqueue_scripts', 'wpb_adding_scripts');

This is the errors that I am getting:

screenshot of errors

I have tried multiple things and nothing seems to work. I attempted running it in different browsers but still it just doesn't want to work. As I stated before it works fine on a static HTML page but does not work with Wordpress... I really need help with this because I have not found any information on integrating this library with a Wordpress site so any input is highly appreciated. Thanks!

Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered

This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: Configuring particles.js with custom wordpress theme


Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription