Looking to enqueue UIKit in your WordPress site?
Add the following in your child theme’s functions.php:
add_action( 'wp_enqueue_scripts', 'custom_load_uikit' );
/**
* Load UIKit.
*/
function custom_load_uikit() {
wp_enqueue_style( 'uikit', '//cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/css/uikit.min.css' );
wp_enqueue_script( 'uikit', '//cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/js/uikit.min.js', array( 'jquery' ), '3.0.0.30', true );
wp_enqueue_script( 'uikit-icons', '//cdnjs.cloudflare.com/ajax/libs/uikit/3.0.0-beta.30/js/uikit-icons.min.js', array( 'jquery' ), '3.0.0.30', true );
}
Refer to https://getuikit.com/docs/installation for the URLs of latest versions.
You save my life! 😀