Make WordPress Core

Opened 12 months ago

Closed 12 months ago

Last modified 12 months ago

#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:


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)

comment:1 SergeyBiryukov12 months ago

  • Keywords reporter-feedback added; needs-testing 2nd-opinion removed

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:

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?

comment:2 Adam Meyer12 months 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.


comment:3 Adam Meyer12 months ago

  • Resolution set to fixed
  • Status changed from new to closed

comment:4 Adam Meyer12 months ago

  • Keywords reporter-feedback removed

comment:5 johnbillion12 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:6 johnbillion12 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from reopened to closed

comment:7 SergeyBiryukov12 months ago

  • Version trunk deleted
Note: See TracTickets for help on using tickets.