Skip to content

Instantly share code, notes, and snippets.

@engelen
Last active December 8, 2016 09:13
Show Gist options
  • Save engelen/015609b2cff87e7e6e91 to your computer and use it in GitHub Desktop.
Save engelen/015609b2cff87e7e6e91 to your computer and use it in GitHub Desktop.
<?php
add_action( 'wp_enqueue_scripts', 'mytheme_scripts' );
/**
* Enqueue Dashicons style for frontend use when enqueuing your theme's style sheet
*/
function mytheme_scripts() {
wp_enqueue_style( 'mytheme-style', get_stylesheet_uri(), 'dashicons' );
}
@ray1618
Copy link

ray1618 commented Dec 8, 2016

Dependancies don't seem to load when added as a string and should be added as an array (using WP 4.7)

wp_enqueue_style( 'mytheme-style', get_stylesheet_uri(), ['dashicons'] );

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment