Skip to content

Instantly share code, notes, and snippets.

@marcelotorres
Last active November 24, 2016 12:56
Show Gist options
  • Save marcelotorres/9d3ccdc74148cddaacd076c1feb511f0 to your computer and use it in GitHub Desktop.
Save marcelotorres/9d3ccdc74148cddaacd076c1feb511f0 to your computer and use it in GitHub Desktop.
Load foundation 6 scripts
<?php
/*
* Carregar JS e CSS
*/
function load_frontend_scripts(){
if(!is_admin()){
//jQuery
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', includes_url( '/js/jquery/jquery.js' ), false, null, true );
wp_enqueue_script( 'jquery' );
//Style principal
wp_enqueue_style( 'main', get_template_directory_uri() . '/style.css');
// Foundation (<theme_folder>/foundation/)
wp_enqueue_style( 'foundation', get_template_directory_uri() . '/foundation/css/foundation.min.css');
wp_enqueue_script( 'foundation', get_template_directory_uri() . '/foundation/js/vendor/foundation.min.js', 'jquery', '', true );
}
}
add_action( 'wp_enqueue_scripts', 'load_frontend_scripts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment