-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Enqueue Dashicons | |
add_action( 'wp_enqueue_scripts', 'enqueue_dashicons' ); | |
function enqueue_dashicons() { | |
wp_enqueue_style( 'dashicons' ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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