Hey dcooney,
I’ve included wp_footer(); in my footer.php. I’m using the popular JointsWP as base for my theme. Here are the last lines from my footer.php:
</div> <!-- end .off-canvas-wrapper -->
<?php wp_footer(); ?>
</body>
</html> <!-- end page -->
So as you can see I’m using it like jeromeramone but no JS is included…
Just switched to a default theme Twentyfifteen and the JS gehts included.
Do you have any idea what breaks the JS inclusion?
Code of my enqueue script, which breaks the JS inclusion (cause if I remove the content of file your JS is loaded):
<?php
function site_scripts() {
global $wp_styles; // Call global $wp_styles variable to add conditional wrapper around ie stylesheet the WordPress way
// Removes WP version of jQuery
wp_deregister_script('jquery');
// Adding scripts file in the footer
wp_enqueue_script( 'site-js', get_template_directory_uri() . '/assets/js/scripts.min.js', '', '', true );
// Register main stylesheet
wp_enqueue_style( 'site-css', get_template_directory_uri() . '/assets/css/style.min.css', array(), '', 'all' );
// Comment reply script for threaded comments
if ( is_singular() AND comments_open() AND (get_option('thread_comments') == 1)) {
wp_enqueue_script( 'comment-reply' );
}
}
add_action('wp_enqueue_scripts', 'site_scripts', 999);
?>
Ok found out that “wp_deregister_script(‘jquery’);” causes that issue. JointsWP is doing that because Foundation needs a specific jQuery version.
How can i make this play nice with your plugin? It depends on jQuery and it looks like that the Foundation jQuery gets included later than your plugin JS or something like that.