Using the Genericons icon font for WordPress dashboard icons
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
#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