#24186 closed defect (bug) (invalid)
Custom Menu Icon not showing for Custom Post Type
Reported by: | Adam Meyer | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | |
Focuses: | Cc: |
Description
Version: 3.6-beta1-24067
This is the first possible bug I've ever reported, so hope I have done it right.
I have specified a custom menu icon as follows during register_post_type:
'menu_icon' => get_bloginfo('template_url').'/images/pillar-icon-16.png',
I have confirmed the image file is in its correct location, but it's still showing the default post icon in the dashboard menu.
The above code works when running 3.5.1.
Change History (7)
#2
@
12 years ago
Thanks Sergey for your reply, I realised I had stuck it in the $labels array accidentally.
Sorry for the inconvenience - I will count that as my rookie mistake.
Adam
Note: See
TracTickets for help on using
tickets.
Could not reproduce in current trunk (3.6-beta1-24095), the icon shows up for me.
As long as a string is passed in that parameter, it will be used as the icon URL:
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-admin/menu.php#L110
It doesn't even matter if the URL is valid. If it's invalid, a broken icon will be displayed instead of the default one.
Could you make sure the post type you are adding the icon to is the one where you expect to see it?