Вопрос

So I noticed that I'm loading jQuery twice in my WordPress install and when I removed the CDN I added in my footer and just use the jQuery WordPress comes with my masonry stopped working and gave the error:

Uncaught TypeError: $(...).masonry is not a function.

so then I tried using wp_enqueue_script('masonry'); and wp_enqueue_script('jquery-masonry'); to load WordPress's version of masonry, it still didn't work and also the script file wasn't loaded either. I'm not sure whats going on any help would be great thanks!

Это было полезно?

Решение

figured it out, turns out i was missing wp_footer() in my footer, once i added that i was able to solve my problem. thanks for the help

Лицензировано под: CC-BY-SA с атрибуция
Не связан с wordpress.stackexchange
scroll top