Following an update to Wordpress 3.8 my custom post type icons no longer work.
I've tried changing the css but if it worked before - why wouldn't it now?
CSS code is:
#adminmenu #menu-posts-cpt-stores:hover div.wp-menu-image, #adminmenu #menu-posts-cpt-stores.wp-has-current-submenu div.wp-menu-image {
background: transparent url('http://localhost:8888/dev.com/wp-content/themes/dev/images/icons/cpt-icon-16x16-hover.png') no-repeat scroll 7px 5px;
}
WordPress now uses dashicons font for custom post types icon so now you don't need to use background property for showing our custom icons for CPT. You can use content property for that...
And Even you can add menu_icon arguments parameter and give class name to it.. for example:
'menu_icon'=>'dashicons-format-gallery',
Here's a helpful article that describes how to use dashicons for custom post types: http://mannieschumpert.com/blog/using-wordpress-3-8-icons-custom-post-types-admin-menu/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With