EDIT: I’m coming back to correct this post, having successfully wp_enqueue’d Foundation 5.3 for Sites to WordPress 3.9. This code below is for anyone who has struggled to WP_ENQUEUE Foundation. The code below works perfectly.
UPDATES: I will continue to update this post with the newest version of WordPress and Foundation to give you all the best WP_ENQUEUE code possible 🙂 youre welcome!
Code below has been updated as of 6/24/14
add_action('init', 'styleEnqueue');
add_action('init', 'foundationEnqueue');
// ----------------------------------------------------------------------------
// register and enqueue styles
// ----------------------------------------------------------------------------
function styleEnqueue() {
if (!is_admin()) {
// enqueue theme styles
wp_enqueue_style('css', get_template_directory_uri()."/css/YOUR_STYLESHEET_FILE_PATH_HERE_FROM_ROOT",array(),'','screen');
// enqueue foundation.min
wp_enqueue_style('css', get_template_directory_uri()."/css/foundation.min.css",array(),'5.1.1','screen');
// enqueue font icons
wp_enqueue_style('icons', get_template_directory_uri()."/css/foundation-icons.css",array(),'5.1.1','screen');
}
}
// ----------------------------------------------------------------------------
// register and enqueue scripts
// ----------------------------------------------------------------------------
function foundationEnqueue() {
if (!is_admin()) {
// deregister core jquery
wp_deregister_script('jquery');
// reregister jquery 2.1.0
wp_register_script('jquery', get_template_directory_uri()."/js/vendor/jquery.js", array(),'2.1.0',false);
// register modernizr
wp_register_script('modernizer', get_template_directory_uri()."/js/vendor/modernizr.js",array(jquery),'2.1.0', false);
// register foundation.min
wp_register_script('foundation', get_template_directory_uri()."/js/foundation.min.js", array('jquery'),'2.1.0',true);
// register YOUR_JS_FILE_HERE
wp_register_script('customjs', get_template_directory_uri()."/js/YOUR_JS_FILE_HERE.js", array('jquery'),'2.1.0',true);
wp_enqueue_script(array('jquery','modernizer','foundation','customjs'));
}
}