Skip to content

Instantly share code, notes, and snippets.

@navalon
Forked from srikat/functions.php
Created October 12, 2016 01:15
Show Gist options
  • Save navalon/7384f550de56f21dc48a6521d34af85a to your computer and use it in GitHub Desktop.
Save navalon/7384f550de56f21dc48a6521d34af85a 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