最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

customization - Understrap child theme JS not working in custom-javascript.js file

programmeradmin3浏览0评论

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." .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."

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.

EDIT: RESOLVED Was unable to find the source of the error. Ended up doing a fresh install of the Understrap child theme, and migrating my custom files over. This eventually resolved my problem and the JavaScript started working again.

发布评论

评论列表(0)

  1. 暂无评论