I'm trying to create a custom WP theme with foundation but the menu never seem to work.
After some time I realized that my scripts loaded (I see them in the header - firebug) but not activating. Weird.
This is my functions.php for loading the scripts. Pretty simple:
function enqueue_test_scripts() {
/* Original Foundation scripts and styles
<script src="js/vendor/jquery.js"></script>
<script src="js/vendor/what-input.js"></script>
<script src="js/vendor/foundation.js"></script>
<script src="js/app.js"></script>
*/
wp_enqueue_style('style-css', get_template_directory_uri().'/css/foundation.min.css');
wp_deregister_script('jquery');
wp_enqueue_script('jquery', get_template_directory_uri().'/js/vendor/jquery.js', false);
wp_enqueue_script('app', get_stylesheet_directory_uri().'/js/app.js', true);
wp_enqueue_script('what-input', get_template_directory_uri().'/js/vendor/what-input.js');
wp_enqueue_script('foundation', get_template_directory_uri().'/js/vendor/foundation.js',true);
}
add_action( 'wp_enqueue_scripts', 'enqueue_test_scripts',0);
Just to make sure I tested a quick and simple html menu in index.html and it works. I then dropped it in below the header in the wordpress theme php file and now it's just static - no dropdown effects or anything.
So the scripts are there, they are loaded, but not doing activating.
My only conclusion is that they are in conflict with something but I have no idea what.
Could it have something to do with using jQuery( instead of $(...?
Something else?