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.
Related Posts:
- Pass PHP variable to javascript
- WordPress 3.5 Media Manager – add a button
- Help making my pagination plugin better
- jQuery plugin only in one page/post
- Is dynamic forms/entries possible in Widget?
- jQuery AJAX call not executing in Plugin
- Add jQuery to WordPress page
- How do I use WordPress PHP functions in my Javascript code?
- What’s the point of using WordPress’s built in admin-ajax.php?
- How to load default scripts included with WordPress correctly?
- Get image URL from media library in input
- Ajax with jQuery UI dialog not working
- jQuery Plugin to use WordPress functions in AJAX request
- Pass a php string to a javascript variable
- Problem in loading javascript in footer
- Using jquery migrate for plugins incompatible with jquery 1.10.2
- scrolltop always 0, can’t trigger script
- Bootstrap Drop Down menu is not working
- Best approach to fetch data from wp options to js file or php file
- Adding a slider captcha to the comment system
- How to put JQuery/Ajax inside shortcode?
- Plugin for a text modal box [closed]
- Can someone please tell me what is wrong with my plugin?
- looking for navigation plugin (accordion) [closed]
- wordpress site | All-in-one-cufon IE Issue
- WordPress function not being called from jQuery method
- Ajax contact form widget plugin data not insert in database
- Time consuming callbacks in customizer
- Modifying a .js Function for Print [QZ Tray, WooCommerce POS]
- How to hide CSS by default and show on button press
- jquery tinymce and bundled wp plugins
- jQuery | JJ Carousel Plugin – Can’t set speed [closed]
- Create shortcode to echo javascript
- how to insert data in wordpress table usnig jquery ajax
- Jquery NoConflict Problem
- this jQuery function works perfect in static html page but not on wordpress
- How to include this jQuery File in wordpress?
- AJAX fileupload – TypeError: not a function ajaxSubmit()
- “Conflict” with jQuery (or its plugins)?
- How to add an element right after the article using jQuery?
- How to track clicks
- Remove Yoast jQuery from front end
- How to display checked posts on another page over AJAX? (like comparasion style)
- Adding media upload button to User Profile page (following a tutorial)
- Is there a function to list all uploaded images? How can I add one?
- How to remove js ui library added by default by wordpress
- I changed .live() to .on() but change is not reflected on the server
- Creating a widget and missing jQuery
- Stop wordpress from requesting external jquery from googleapi
- Plugin not working & permalink erorr after upgrade to php 7x on Nginx
- Save user total active time after login in wordpress [closed]
- Opening a JQuery modal window on click of a button with a JQuery plugin
- Api external with wordpress
- How do I make sure that my plugin only runs on article detail pages?
- Why do I get jQuery reference error / undefined when changing name of plugin file?
- How to prevent tabs from opening all at once
- Why jquery option is not working when pass value using wp_localize_script?
- jQuery code didn’t run on my plugin
- The Events Calendar Plugin – List View Background Colour Issue [closed]
- “switchEditors is not defined” with wp_editor() in jQuery UI tabs
- Separate jQuery for Individual Comments?
- force jQuery to load in the head
- Ajax request sends url rather than data
- Error jQuery(domChunk).live is not a function
- Problems with jQuery and is_admin()
- sliding/fading header plugin or approach suggestion
- Pass PHP variable to javascript
- Cannot read properties of undefined (reading ‘firstChild’) using photoswipe in product page
- Trigger jQuery to add events after AJAX-loading table in admin plugin
- How do I reinit WordPress plugins dynamically using jS?
- login form should redirect to register page for in 1st login next time it should redirected to home page
- How to get a specific string from a url
- Does anybody know how to insert a complete jquery plugin into a wordpress elementor-page?
- JS working when used normally but not in wordpress
- $wpdb not working wordpress plugin ajax call
- main navigation menu disappear after adding jquery source file
- Scroll to ID broken in main menu
- Dynamic input fields in WordPress Plugin
- Overwrite js code using WP_Footer
- jquery plugin won’t fire when hamburger class element clicked
- Storing Array of values into wordpress options
- jQuery to show icon after .hide
- How to add styling and script to a custom widget plugin
- Add HTML between feed items
- WordPress Feedback popup with date saved into table
- Not getting result using ajax on wordpress
- WordPress ajax not working in registration
- AJAX doesn’t pass variables to the php function in the plugin
- how to call jQuery in admin as well as in homepage
- “The Events Calendar” Issues in WP 3.2
- How do I output user_registered time in my correct timezone?
- Ajax in Plugins: returns the whole page
- Shortcode return is printing a 1 afterward
- FacetWP: Plugin breaks button/modal functionality inside searchable content area
- TypeErrors with Yoast, jQuery in conflict?
- Count div with class (.length) only shows 0 [closed]
- Jquery post responses 500 error after some time and lastly an 503 error
- Ajax button “Load more” is not loading correct language version posts for logged out users
- WordPress GiveWP Plugin showing blank page in none default theme [closed]
- Woocommerce attatch files and custom input meta to cart items and then to order