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

I need to add this:

jQuery(window).load(function() {

Right before the closing tag of the Wordpress login page's </body> tag.
How do you do it? Would I use a combination of login_enqueue_scripts and wp_enqueue_scripts and set $in_footer to true? I'm not entirely sure how I would do that either...

share|improve this question

This is what ended up working for me: Put your script into a .js file and then:

add_action( 'login_enqueue_scripts', 'enqueue_my_script' );

function enqueue_my_script( $page ) {
    wp_enqueue_script( 'my-script', 'http://domain.com/path/myjs-file.js', null, null, true );
share|improve this answer

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.