In my WordPress plugin I try to include two scripts in the page footer, like so:

function my_interface_enqueues() {
        wp_enqueue_script( 'require-js', plugin_dir_url( __FILE__ ) . 'js/libs/requirejs/require.js', array(), false, true );
        wp_enqueue_script( 'main-js', plugin_dir_url( __FILE__ ) . 'js/main.js', array(), false, true );
    }

Yet when I check the rendered page, the scripts are inside the , despite the 5th parameter being set true. What could cause this?

WordPress version is 4.7.3

Read more here: wp_enqueue_script fails to include in footer


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: