• Dear WordPressers,

    I try to call the accordion javascript in my WordPress template as follows:

    wp_enqueue_script("jquery");
    wp_enqueue_script("jquery-ui");
    wp_enqueue_script("jquery-ui-widget");
    wp_enqueue_script("jquery-ui-accordion");

    All the lines above are called before wp_head();
    The top line is shown in the header, but the lower three lines, however, are placed in the footer.

    I know about the syntax of “wp_enqueue_script”, and as stated in the WordPress Codex, the last argument ($in_footer) is false by default. So theoretically, all the scripts should be loaded in the header.

    Who can help me solve this problem?

    Thanks and best regards,
    Irian

  • The topic ‘wp_enqueue_script goes to footer’ is closed to new replies.