Skip to content

Instantly share code, notes, and snippets.

@maksimerohin
Last active December 28, 2018 18:14
Show Gist options
  • Save maksimerohin/aeea7617ebb6db10d3e5587ab6ec1925 to your computer and use it in GitHub Desktop.
Save maksimerohin/aeea7617ebb6db10d3e5587ab6ec1925 to your computer and use it in GitHub Desktop.
Подключение стилей и скриптов
function me_ipapus_scripts() {
wp_enqueue_style( 'me-ipapus-style', get_stylesheet_uri(), array(), filemtime( get_theme_file_path() . '/style.css' ) );
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js');
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'me-bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), filemtime( get_theme_file_path() . '/js/bootstrap.min.js' ), true );
wp_enqueue_script( 'me-functions', get_template_directory_uri() . '/js/functions.js', array('jquery'), filemtime( get_theme_file_path() . '/js/functions.js' ), true );
}
add_action( 'wp_enqueue_scripts', 'me_ipapus_scripts' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment