WordPress 3.8 custom post type icon

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?

Read More

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;
}

Related posts

Leave a Reply

2 comments

  1. 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’,