Skip to content

Instantly share code, notes, and snippets.

@jazzsequence
Last active December 21, 2015 07:58
Embed
What would you like to do?
Using the Genericons icon font for WordPress dashboard icons
#menu-posts-book-review .wp-menu-image {
background: none!important;
}
#menu-posts-book-review .wp-menu-image:before {
font-family: 'Genericons'!important; /* this assumes you've loaded Genericons in your admin */
content: '\f444'; /* replace this with your icon */
font-size: 20px;
position: relative;
left: 5px; /* positions the icon */
top: 4px; /* positions the icon */
text-shadow: 1px 1px 0px #eee;
color: #aaa;
}
#menu-posts-book-review:hover .wp-menu-image:before, .wp-has-current-submenu#menu-posts-book-review .wp-menu-image:before {
color: #21759b;
}
.wp-has-current-submenu#menu-posts-book-review .wp-menu-image:before {
text-shadow: 1px 1px 0px #555;
}
div#icon-edit.icon32-posts-book-review {
background-image: none;
}
div#icon-edit.icon32-posts-book-review:after {
font-family: 'Genericons'!important;
content: '\f444'; /* replace this with your icon */
color: #555;
font-size: 32px;
position: relative;
top: -5px; /* positions the icon */
left: 5px; /* positions the icon */
}
/* this adds support for MP6 & future WP (3.7/8, whichever gets the dashboard css update) */
/* this is largely thanks to: https://github.com/Gizburdt/Wordpress-Cuztom-Helper/issues/152#issuecomment-17490472 */
.mp6 #adminmenu #menu-posts-book-review div.wp-menu-image:before {
font-family: 'Genericons'!important;
content: '\f444'; /* replace this with your icon */
left: 0; /* resets the positioning for MP6/future WP */
top: 0; /* resets the positioning for MP6/future WP */
text-shadow: none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment