I want to move all the script calls in my header.php into my function.php. I transfered everything to my function.php: (updated!)
Here's my whole function.php just to make sure that there's not some other mistake that keeps interfering with the wp_enqueue or something: http://pastebin.com/mhCNZbFW Also, I entered the code into my PARENT THEME's function.php! I do not use a function.php for my child theme at all.
And I tried to call the action in my header.php: (UPDATE: Currently NO HOOK at all, also no CALL in my header.php!!)
Result: All the scripts are properly loaded (checked with Firebug), but none of them actually works! Only the "custom.js" works (even without the action being called in the header.php).
Why does this not work? Please help me working through this as it's causing so many problems!
Step2: (RESOLVED) Next step will be to provide no.Conflict wrappers to every jQuery JS (which also doesn't work).
What I already tried: - deactivated all plugins (no effect) - created a function.php for my child theme and moved the code above from the parent theme's function.php there (result: error message
Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'get_my_scripts' was given in /hermes/bosweb25a/b155/ipg.zoomingjapancom/wp-includes/plugin.php on line 405
- tried another theme (TwentyEleven): same issues - I tried to call it like that in the header.php (as that's how it's done in the TwentyEleven theme:
<?php wp_enqueue_script( 'jquery', 'jquerytools', 'jquery-ui-person', 'jqueryform', 'sprinkle', 'custom', 'tooltip' ); wp_head(); ?> </head>
That also doesn't work ...
LATEST NEWS: See updated function.php code above. I got to work quite a few things now. As for the jquery-form that was needed for the contact.php I just took the direct script call out of the contact.php and put it into its own js file, then wrapped it with a no_Conflict wrapper and now it works just fine! Only thing I'm worried about is whether Wordpress will now load it on every single page although it's only needed on the contact.php??!!
THE ONLY THING THAT IS STILL NOT WORKING is sprinkle.js: Possible reason is that there might be a conflict with the ui-tabs and the jquerytools-ui-tabs. I should do something like this, but don't know where to put it:
If you need any further information, please let me know! Here's my website for reference. I just can't do this on my own. Please give me some advice! Anything might help :) Thanks so much in advance!