Is the same as installing any other wordpress plugins?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Display product ACF field value in Woocommerce tra
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
I'd supplement saibot's answer by saying that, instead of a raw
<script>...</script>
block, you should usewp_enqueue_script()
also when including the plugin script:And to make sure you're including jQuery, i'd supplement to Jani's answer:
get_stylesheet_directory_uri()
would be just in case your script is located in a child-themeOld thread i know, just wanted to share as it got me stuck for some time... until i added that 'jquery' in the array.
Not really, you kind of have to go through the back door a little.
First off, make sure you're including jQuery the 'right' way (WP includes a copy):
In the header, include the plugin script the way you normally would, eg,
And then when you are writing your script, make sure it's in no-conflict mode:
And then stick the actual script inside the jQuery no-conflict wrapper.
Hope this helps.