• Hey guys,

    I want to alter my registration form and need some javascript for it. I would like to use the jquery-library, but cannot manage to include it via wordpress-functions.

    As in WordPress Function Reference – wp_enqueue_script I use the init-Hook, after trying get_header, wp_head, wp_enqueue_scripts but neither of them worked.

    add_action('init', array(&$this, 'add_jquery'));
    function add_jquery(){ wp_enqueue_script( 'jquery' ); }

    What am I missing?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Why are you trying to re-load jQuery?

    Thread Starter IM_natascha

    (@im_natascha)

    Funny – if it would have been loaded, my test should have worked but didn’t. So I thought, I needed to load jQuery.

    As my function didn’t work, I hardcoded the import of jQuery.
    I tested it right now – without my hardcoded jQuery-Import my Script does not work, so jQuery is most likly not imported. I even searched the html-code, but as expected didn’t find anything about jQuery.
    Maybe the jQuery-Lib is not loaded for the registration page.

    Thread Starter IM_natascha

    (@im_natascha)

    Is there anyone who knows a solution?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘load jquery’ is closed to new replies.