Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active February 20, 2017 09:28
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 srikat/25895c82d7535c72e8f19bc9b20ecb7e to your computer and use it in GitHub Desktop.
Save srikat/25895c82d7535c72e8f19bc9b20ecb7e to your computer and use it in GitHub Desktop.
How to add font icons before navigation menu items in Genesis using Dashicons. http://sridharkatakam.com/add-font-icons-navigation-menu-items-genesis-using-dashicons/
//* Enqueue Dashicons
add_action( 'wp_enqueue_scripts', 'enqueue_dashicons' );
function enqueue_dashicons() {
wp_enqueue_style( 'dashicons' );
}
.nav-header li > a:before {
-webkit-font-smoothing: antialiased;
font: normal 20px/1 'dashicons';
vertical-align: middle;
padding-right: 4px;
display: inline-block;
}
.nav-header li > a:hover:before {
text-decoration: none;
}
.nav-header li.sample > a:before {
content: "\f313";
}
.nav-header li.layouts > a:before {
content: "\f181";
}
.nav-header li.templates > a:before {
content: "\f116";
}
.nav-header li.contact > a:before {
content: "\f466";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment