Skip to content

Instantly share code, notes, and snippets.

@daronspence
Last active October 11, 2023 14:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save daronspence/4e7c666529d3a7cc29b9 to your computer and use it in GitHub Desktop.
Save daronspence/4e7c666529d3a7cc29b9 to your computer and use it in GitHub Desktop.
Font Awesome Wordpress Admin Icons
<?php
// Loads FontAwesome & assigns dashicon prefixed classes to correspond to FontAwesome fallbacks.
// This allows 'dashicons-' to be used when declaring custom post type icons.
function font_awesome_icons(){ ?>
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<style>
.dashicons-before:before { font-family: dashicons, FontAwesome; }
.dashicons-suitcase:before { content: "\f0f2"; }
.dashicons-cutlery:before { content: "\f0f5"; }
</style>
<?php }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment