WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

..doesn't seem to work, no matter where I put it. I've tried the following and lots of googling:

function my_callback() {
add_action('wp_enqueue_scripts', 'my_callback');




share|improve this question
Related: How Do I Use jQuery UI In My Plugin – toscho Oct 18 '13 at 23:46
What does "doesnt work" mean? Have you viewed source to see if the script loads? Or are you saying you can't make a script shake (which could be a whole boatload of other problem) – cale_b Oct 19 '13 at 3:15
It isn't adding the script to <head>. – patrickkidd Oct 19 '13 at 18:53
toscho: That is one of the docs that I read. I am doing the same thing and it's still not adding the script to <head> – patrickkidd Oct 19 '13 at 18:55
Is the theme using the wp_head and wp_footer function calls? You said it's not loading in <head>, does that mean it's loading somewhere else or not at all? – morganestes Oct 25 '13 at 3:31

Make sure you are also including the jquery effects core... and jquery if it's not already being loaded.

function my_callback() {
    wp_enqueue_script('jquery');  // If not already loaded
add_action('wp_enqueue_scripts', 'my_callback');
share|improve this answer
Shouldn't those be automatically included as Dependencies? Adding them made no difference for me. – patrickkidd Oct 19 '13 at 18:53
Are you trying to do this in the admin panel, or in a template file for the front-end of the site? – josh Oct 19 '13 at 19:15
In a template on the front-end of the site. – patrickkidd Oct 22 '13 at 20:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.