Try placing your code in this
(function($) {
// Inside of this function, $() will work as an alias for jQuery()
// and other libraries also using $ will not be accessible under this shortcut
})(jQuery);
I’m suspecting your code uses $
, which is normally an alias for jQuery
but doesn’t work globally because WP’s version of jQuery
is in no conflict mode. $
will work if the code is placed in an enclosure such as the one above.