customization – Understrap child theme JS not working in custom-javascript.js file
I’m developing a WordPress custom theme using the child-theme of Understrap.
I’m adding my custom jQuery to child-theme > src > js > custom-javascript.js, and the file is already commented with “// Add your custom JS here.”
https://github.com/understrap/understrap-child/blob/main/src/js/custom-javascript.js
I did this as instructed from the Understrap Documentation:
“Add your own JS to /src/js/custom-javascript.js to have them bundled into /js/child-theme.js.”
https://docs.understrap.com/#/understrap-child/npm
I’ve run the script in the console, and it works as intended, so the error is not with my script.
Yes, I have tried clearing my cache.
I’ve seen a few other questions related to needing to update a gulpfile.js, but no such file is included in my child OR parent theme, I have used the search function, and I also cannot find it on the Understrap GitHub repo.
Is the script not enqueuing properly? Have I missed something?
Thanks in advance.
Leave an answer