Skip to content

Instantly share code, notes, and snippets.

@keithdevon
Last active March 9, 2016 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keithdevon/db6e90f4a419c4a2c08b to your computer and use it in GitHub Desktop.
Save keithdevon/db6e90f4a419c4a2c08b to your computer and use it in GitHub Desktop.
// Load stylesheets, and load dashicons as a dependency
function hr_load_your_css(){
if(!is_admin()){
$css_link = get_stylesheet_directory_uri() . '/assets/css/style.min.css';
$css_file = get_stylesheet_directory() . '/assets/css/style.min.css';
wp_enqueue_style('theme-style', $css_link, array('dashicons'), filemtime($css_file), 'all');
}
}
add_action('wp_enqueue_scripts', 'hr_load_your_css');
<a href="<?php echo esc_url( $resource_link ); ?>"><i class="dashicons <?php the_hr_link_dashicon($resource_link); ?>"></i> View document</a>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment